├── .gitignore ├── .idea ├── .gitignore ├── vcs.xml ├── modules.xml └── misc.xml ├── src └── VBAObfuscator │ ├── Main.java │ ├── Morphs │ ├── Morph.java │ ├── MorphListener.java │ ├── IDMorph │ │ ├── ScopeLevel.java │ │ ├── Scope.java │ │ ├── IDMorph.java │ │ ├── GlobalsListener.java │ │ └── IDMorphListener.java │ ├── UselessCodeMorph │ │ ├── UselessCodeMorph.java │ │ └── UselessCodeMorphListener.java │ └── LiteralEncoderMorph │ │ ├── LiteralEncoderMorph.java │ │ └── LiteralEncoderMorphListener.java │ ├── CodeGenerator │ └── CodeGenerator.java │ ├── VBAObfuscator.java │ └── parser │ ├── vba.tokens │ ├── vbaLexer.tokens │ ├── vba.g4 │ ├── vbaVisitor.java │ └── vbaBaseVisitor.java ├── test1.vba ├── VBAObfuscator.iml ├── test1_obfuscated.vba ├── README.md └── LICENSE /.gitignore: -------------------------------------------------------------------------------- 1 | # Project exclude paths 2 | /out/ 3 | /.idea/ 4 | antlr-runtime-4.8.jar -------------------------------------------------------------------------------- /.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /shelf/ 3 | /workspace.xml 4 | antlr-runtime-4.8.jar -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/VBAObfuscator/Main.java: -------------------------------------------------------------------------------- 1 | package VBAObfuscator; 2 | 3 | public class Main { 4 | 5 | public static void main(String[] args) 6 | { 7 | VBAObfuscator obfuscator = new VBAObfuscator(); 8 | obfuscator.obfuscate("test1.vba"); 9 | } 10 | 11 | } 12 | -------------------------------------------------------------------------------- /test1.vba: -------------------------------------------------------------------------------- 1 | Sub Something() 2 | 3 | Dim A As Integer 4 | A = 100 5 | MsgBox A 6 | 7 | End Sub 8 | 9 | Sub MoreSomethingElses() 10 | Dim B As String 11 | B = "Hello world" 12 | MsgBox B 13 | End Sub 14 | 15 | Sub SomethingElse() 16 | Dim A As Boolean 17 | A = True 18 | End Sub -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/VBAObfuscator/Morphs/Morph.java: -------------------------------------------------------------------------------- 1 | package VBAObfuscator.Morphs; 2 | 3 | import org.antlr.v4.runtime.CommonTokenStream; 4 | import org.antlr.v4.runtime.TokenStream; 5 | import org.antlr.v4.runtime.tree.ParseTree; 6 | 7 | public interface Morph { 8 | 9 | public String morph(ParseTree program, CommonTokenStream tokens); 10 | 11 | public String getDescription(); 12 | 13 | } 14 | -------------------------------------------------------------------------------- /src/VBAObfuscator/Morphs/MorphListener.java: -------------------------------------------------------------------------------- 1 | package VBAObfuscator.Morphs; 2 | 3 | import VBAObfuscator.parser.vbaBaseListener; 4 | import org.antlr.v4.runtime.TokenStreamRewriter; 5 | 6 | public class MorphListener extends vbaBaseListener { 7 | 8 | protected TokenStreamRewriter rewriter; 9 | 10 | public MorphListener(TokenStreamRewriter rewriter) 11 | { 12 | this.rewriter = rewriter; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/VBAObfuscator/Morphs/IDMorph/ScopeLevel.java: -------------------------------------------------------------------------------- 1 | package VBAObfuscator.Morphs.IDMorph; 2 | 3 | import java.util.HashMap; 4 | import java.util.Map; 5 | 6 | public class ScopeLevel { 7 | 8 | private Map translations; 9 | 10 | public ScopeLevel() 11 | { 12 | this.translations = new HashMap<>(); 13 | } 14 | 15 | public boolean contains(String id) 16 | { 17 | return this.translations.containsKey(id); 18 | } 19 | 20 | public String get(String id) 21 | { 22 | return this.translations.get(id); 23 | } 24 | 25 | public void insert(String k, String v) 26 | { 27 | this.translations.put(k, v); 28 | } 29 | 30 | } -------------------------------------------------------------------------------- /VBAObfuscator.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/VBAObfuscator/Morphs/UselessCodeMorph/UselessCodeMorph.java: -------------------------------------------------------------------------------- 1 | package VBAObfuscator.Morphs.UselessCodeMorph; 2 | 3 | import VBAObfuscator.Morphs.Morph; 4 | import org.antlr.v4.runtime.CommonTokenStream; 5 | import org.antlr.v4.runtime.TokenStreamRewriter; 6 | import org.antlr.v4.runtime.tree.ParseTree; 7 | import org.antlr.v4.runtime.tree.ParseTreeWalker; 8 | 9 | public class UselessCodeMorph implements Morph { 10 | 11 | public String morph(ParseTree program, CommonTokenStream tokens) 12 | { 13 | TokenStreamRewriter rewriter = new TokenStreamRewriter(tokens); 14 | ParseTreeWalker walker = new ParseTreeWalker(); 15 | 16 | UselessCodeMorphListener morph = new UselessCodeMorphListener(rewriter); 17 | 18 | walker.walk(morph, program); 19 | 20 | return rewriter.getText(); 21 | } 22 | 23 | public String getDescription() 24 | { 25 | return "adds useless code to distract"; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/VBAObfuscator/Morphs/LiteralEncoderMorph/LiteralEncoderMorph.java: -------------------------------------------------------------------------------- 1 | package VBAObfuscator.Morphs.LiteralEncoderMorph; 2 | 3 | import VBAObfuscator.Morphs.IDMorph.IDMorphListener; 4 | import VBAObfuscator.Morphs.Morph; 5 | import org.antlr.v4.runtime.CommonTokenStream; 6 | import org.antlr.v4.runtime.TokenStreamRewriter; 7 | import org.antlr.v4.runtime.tree.ParseTree; 8 | import org.antlr.v4.runtime.tree.ParseTreeWalker; 9 | 10 | public class LiteralEncoderMorph implements Morph { 11 | @Override 12 | public String morph(ParseTree program, CommonTokenStream tokens) { 13 | TokenStreamRewriter rewriter = new TokenStreamRewriter(tokens); 14 | ParseTreeWalker walker = new ParseTreeWalker(); 15 | 16 | LiteralEncoderMorphListener morph = new LiteralEncoderMorphListener(rewriter); 17 | 18 | walker.walk(morph, program); 19 | 20 | return rewriter.getText(); 21 | } 22 | 23 | @Override 24 | public String getDescription() { 25 | return "encode literal tokens to be unreadable at plain sight"; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/VBAObfuscator/Morphs/UselessCodeMorph/UselessCodeMorphListener.java: -------------------------------------------------------------------------------- 1 | package VBAObfuscator.Morphs.UselessCodeMorph; 2 | 3 | import VBAObfuscator.CodeGenerator.CodeGenerator; 4 | import VBAObfuscator.Morphs.MorphListener; 5 | import VBAObfuscator.parser.vbaParser; 6 | import org.antlr.v4.runtime.TokenStreamRewriter; 7 | 8 | import java.util.List; 9 | 10 | public class UselessCodeMorphListener extends MorphListener { 11 | 12 | private final CodeGenerator gen; 13 | 14 | public UselessCodeMorphListener(TokenStreamRewriter rewriter) { 15 | super(rewriter); 16 | 17 | this.gen = new CodeGenerator(); 18 | } 19 | 20 | @Override 21 | public void enterModuleBody(vbaParser.ModuleBodyContext ctx) { 22 | List moduleElements = ctx.moduleBodyElement(); 23 | 24 | for(vbaParser.ModuleBodyElementContext ele: moduleElements) 25 | { 26 | rewriter.insertBefore(ele.getStart(), gen.generateUselessSub()); 27 | rewriter.insertAfter(ele.getStop(), gen.generateUselessSub()); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/VBAObfuscator/Morphs/IDMorph/Scope.java: -------------------------------------------------------------------------------- 1 | package VBAObfuscator.Morphs.IDMorph; 2 | 3 | import java.util.ArrayDeque; 4 | import java.util.Deque; 5 | 6 | public class Scope { 7 | 8 | private Deque scope; 9 | 10 | public Scope() 11 | { 12 | this.scope = new ArrayDeque<>(); 13 | } 14 | 15 | public void pushLevel() 16 | { 17 | this.scope.push(new ScopeLevel()); 18 | } 19 | 20 | public void popLevel() { this.scope.pop(); } 21 | 22 | public void insert(String k, String v) 23 | { 24 | this.scope.peek().insert(k, v); 25 | } 26 | 27 | public boolean inScope(String id) 28 | { 29 | for(ScopeLevel lvl: scope) 30 | { 31 | if(lvl.contains(id)) 32 | return true; 33 | } 34 | 35 | return false; 36 | } 37 | 38 | public String get(String id) 39 | { 40 | ScopeLevel lvl = findScopeOf(id); 41 | assert lvl != null; 42 | return lvl.get(id); 43 | } 44 | 45 | private ScopeLevel findScopeOf(String id) { 46 | for (ScopeLevel lvl : scope) { 47 | if (lvl.contains(id)) 48 | return lvl; 49 | } 50 | 51 | return null; 52 | } 53 | 54 | } -------------------------------------------------------------------------------- /src/VBAObfuscator/Morphs/IDMorph/IDMorph.java: -------------------------------------------------------------------------------- 1 | package VBAObfuscator.Morphs.IDMorph; 2 | 3 | import VBAObfuscator.Morphs.Morph; 4 | import org.antlr.v4.runtime.CommonTokenStream; 5 | import org.antlr.v4.runtime.TokenStream; 6 | import org.antlr.v4.runtime.TokenStreamRewriter; 7 | import org.antlr.v4.runtime.tree.ParseTree; 8 | import org.antlr.v4.runtime.tree.ParseTreeWalker; 9 | 10 | public class IDMorph implements Morph { 11 | 12 | public String morph(ParseTree program, CommonTokenStream tokens) 13 | { 14 | TokenStreamRewriter rewriter = new TokenStreamRewriter(tokens); 15 | ParseTreeWalker walker = new ParseTreeWalker(); 16 | 17 | Scope scope = new Scope(); 18 | 19 | /* Collect global identifiers so the order of declaration doesnt matter on the second pass */ 20 | GlobalsListener firstMorph = new GlobalsListener(rewriter, scope); 21 | walker.walk(firstMorph, program); 22 | 23 | /* second pass */ 24 | IDMorphListener secondMorph = new IDMorphListener(rewriter, scope); 25 | walker.walk(secondMorph, program); 26 | 27 | return rewriter.getText(); 28 | } 29 | 30 | public String getDescription() 31 | { 32 | return "renaming variables and functions identifiers for random strings"; 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /src/VBAObfuscator/CodeGenerator/CodeGenerator.java: -------------------------------------------------------------------------------- 1 | package VBAObfuscator.CodeGenerator; 2 | 3 | import java.util.Random; 4 | 5 | public class CodeGenerator { 6 | 7 | public String generateUselessSub() 8 | { 9 | String sub = "\nSub "; 10 | sub += generateRandomIdentifier() + "()\n"; 11 | String var1 = generateRandomIdentifier(); 12 | sub += "Dim " + var1 + " as Integer\n" + var1 + " = " + generateRandomInteger() + "\n"; 13 | sub += "MsgBox " + var1 + "\n"; 14 | sub += "End Sub\n"; 15 | return sub; 16 | } 17 | 18 | public String generateRandomIdentifier() 19 | { 20 | int leftLimit = 97; // letter 'a' 21 | int rightLimit = 122; // letter 'z' 22 | int targetStringLength = 10; 23 | Random random = new Random(); 24 | 25 | return random.ints(leftLimit, rightLimit + 1) 26 | .limit(targetStringLength) 27 | .collect(StringBuilder::new, StringBuilder::appendCodePoint, StringBuilder::append) 28 | .toString(); 29 | } 30 | 31 | public String generateRandomInteger() 32 | { 33 | // https://docs.microsoft.com/en-us/office/vba/Language/Reference/User-Interface-Help/data-type-summary 34 | int lowerLimit = -32768; 35 | int upperLimit = 32767; 36 | 37 | Random random = new Random(); 38 | 39 | // https://stackoverflow.com/questions/27976857/how-do-i-get-a-random-number-with-a-negative-number-in-range 40 | return String.valueOf(random.nextInt((upperLimit - lowerLimit) + 1) + lowerLimit); 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /src/VBAObfuscator/Morphs/IDMorph/GlobalsListener.java: -------------------------------------------------------------------------------- 1 | package VBAObfuscator.Morphs.IDMorph; 2 | 3 | import VBAObfuscator.CodeGenerator.CodeGenerator; 4 | import VBAObfuscator.Morphs.MorphListener; 5 | import VBAObfuscator.parser.vbaParser; 6 | import org.antlr.v4.runtime.Token; 7 | import org.antlr.v4.runtime.TokenStreamRewriter; 8 | import org.antlr.v4.runtime.tree.TerminalNode; 9 | 10 | public class GlobalsListener extends MorphListener { 11 | 12 | private final Scope scope; 13 | private final CodeGenerator gen; 14 | 15 | public GlobalsListener(TokenStreamRewriter rewriter, Scope scope) 16 | { 17 | super(rewriter); 18 | 19 | this.scope = scope; 20 | this.gen = new CodeGenerator(); 21 | } 22 | 23 | @Override public void enterModule(vbaParser.ModuleContext ctx) 24 | { 25 | this.scope.pushLevel(); 26 | } 27 | 28 | @Override public void enterSubStmt(vbaParser.SubStmtContext ctx) { 29 | TerminalNode terminalNode = ctx.ambiguousIdentifier().getToken(vbaParser.IDENTIFIER, 0); 30 | Token token = terminalNode.getSymbol(); 31 | 32 | replaceID(token); 33 | } 34 | 35 | @Override public void enterFunctionStmt(vbaParser.FunctionStmtContext ctx) 36 | { 37 | TerminalNode terminalNode = ctx.ambiguousIdentifier().getToken(vbaParser.IDENTIFIER, 0); 38 | Token token = terminalNode.getSymbol(); 39 | 40 | replaceID(token); 41 | } 42 | 43 | private void replaceID(Token token) 44 | { 45 | String qwe = this.gen.generateRandomIdentifier(); 46 | if(this.scope.inScope(token.getText())) 47 | { 48 | qwe = this.scope.get(token.getText()); 49 | } 50 | else 51 | this.scope.insert(token.getText(), qwe); 52 | 53 | rewriter.replace(token, qwe); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /test1_obfuscated.vba: -------------------------------------------------------------------------------- 1 | 2 | Sub qxgsimknfa() 3 | Dim hjqdfzxgly as Integer 4 | hjqdfzxgly = 0 - 6254 - 224 - 55 - 62 - 60 - 11 - 2 - 0 - 1 5 | MsgBox hjqdfzxgly 6 | End Sub 7 | Sub gwogeznbid() 8 | 9 | Dim hpdqnzwdrc As Integer 10 | hpdqnzwdrc = 0 + 21 + 39 + 32 + 6 + 1 + 0 + 1 11 | MsgBox hpdqnzwdrc 12 | 13 | End Sub 14 | Sub zkigfdhxjr() 15 | Dim nidslhsbco as Integer 16 | nidslhsbco = 0 - 2112 - 12060 - 5592 - 758 - 464 - 84 - 2 - 5 17 | MsgBox nidslhsbco 18 | End Sub 19 | 20 | 21 | 22 | Sub vptaksnuca() 23 | Dim tsbfwwtaco as Integer 24 | tsbfwwtaco = 0 + 11147 + 2657 + 4773 + 1746 + 3831 + 832 + 181 + 101 + 13 + 205 25 | MsgBox tsbfwwtaco 26 | End Sub 27 | Sub ffrvhiebgh() 28 | Dim xatbbhvmfa As String 29 | xatbbhvmfa = qakyjxlowy("2248656c6c6f20776f726c6422") 30 | MsgBox xatbbhvmfa 31 | End Sub 32 | Sub aaywxbfilu() 33 | Dim enpatzaeoi as Integer 34 | enpatzaeoi = 0 - 9156 - 1578 - 326 - 27 - 217 - 29 - 40 - 18 35 | MsgBox enpatzaeoi 36 | End Sub 37 | Public Function qakyjxlowy(ByVal luznneuskl As String) As String 38 | Dim sxzbipbglb As String 39 | Dim eyrgjyayae As String 40 | Dim planxfjawg As Long 41 | For planxfjawg = 1 To Len(luznneuskl) Step 2 42 | sxzbipbglb = Chr$(Val("&H" & Mid$(luznneuskl, planxfjawg, 2))) 43 | eyrgjyayae = eyrgjyayae & sxzbipbglb 44 | Next planxfjawg 45 | qakyjxlowy = eyrgjyayae 46 | End Function 47 | 48 | 49 | 50 | 51 | Sub gvixfhkafv() 52 | Dim ulpjmxpgay as Integer 53 | ulpjmxpgay = 0 + 450 + 9291 + 722 + 396 + 50 + 140 + 5 + 0 + 10 + 9 + 1 54 | MsgBox ulpjmxpgay 55 | End Sub 56 | Sub iptcuinysv() 57 | Dim hzxoexpcqt As Boolean 58 | hzxoexpcqt = (((((Not (False Xor False)) And ((False Xor False) Or (False Xor False))) Or (((False Xor True) Xor (False And False)) Or ((True And True) Xor (False Or False)))) Or ((((True Xor False) Or (True Or True)) Xor ((False Or True) Xor (True Xor False))) Xor ((Not (True Or False)) And ((Not False) Or (False And True))))) Or ((Not (((Not False) Xor (True Xor True)) Or (Not (False Xor True)))) Xor ((((False Or False) Xor (True And True)) Or ((True Or False) And (True Xor False))) Xor (Not ((False Or False) Or (False And False)))))) 59 | End Sub 60 | Sub dnmnvsxbhl() 61 | Dim lesrscgots as Integer 62 | lesrscgots = 0 + 15555 + 1632 + 1489 + 2269 + 396 + 703 + 391 + 103 + 11 + 1 + 0 + 1 + 0 + 0 + 1 63 | MsgBox lesrscgots 64 | End Sub 65 | -------------------------------------------------------------------------------- /src/VBAObfuscator/VBAObfuscator.java: -------------------------------------------------------------------------------- 1 | package VBAObfuscator; 2 | 3 | import VBAObfuscator.Morphs.IDMorph.IDMorph; 4 | import VBAObfuscator.Morphs.LiteralEncoderMorph.LiteralEncoderMorph; 5 | import VBAObfuscator.Morphs.Morph; 6 | import VBAObfuscator.Morphs.UselessCodeMorph.UselessCodeMorph; 7 | import VBAObfuscator.parser.vbaLexer; 8 | import VBAObfuscator.parser.vbaParser; 9 | import org.antlr.v4.runtime.CharStream; 10 | import org.antlr.v4.runtime.CommonTokenStream; 11 | import org.antlr.v4.runtime.TokenStream; 12 | import org.antlr.v4.runtime.tree.ParseTree; 13 | 14 | import java.io.BufferedWriter; 15 | import java.io.FileWriter; 16 | import java.io.IOException; 17 | import java.util.LinkedList; 18 | import java.util.List; 19 | 20 | import static org.antlr.v4.runtime.CharStreams.fromFileName; 21 | import static org.antlr.v4.runtime.CharStreams.fromString; 22 | 23 | public class VBAObfuscator { 24 | 25 | private final List morphs; 26 | 27 | public VBAObfuscator() 28 | { 29 | this.morphs = new LinkedList<>(); 30 | this.morphs.add(new UselessCodeMorph()); 31 | this.morphs.add(new LiteralEncoderMorph()); 32 | this.morphs.add(new IDMorph()); 33 | } 34 | 35 | public void obfuscate(String src) 36 | { 37 | try 38 | { 39 | CharStream cs = fromFileName(src); 40 | boolean firstRead = true; 41 | String source = ""; 42 | 43 | for(Morph morph: morphs) 44 | { 45 | System.out.println("Applying morph: " + morph.getDescription()); 46 | if(!firstRead) 47 | cs = fromString(source); 48 | 49 | vbaLexer lexer = new vbaLexer(cs); 50 | CommonTokenStream tokens = new CommonTokenStream(lexer); 51 | 52 | vbaParser parser = new vbaParser(tokens); 53 | ParseTree tree = parser.startRule(); 54 | 55 | source = morph.morph(tree, tokens); 56 | 57 | firstRead = false; 58 | } 59 | 60 | String[] splits = src.split("\\."); 61 | String output = splits[0].concat("_obfuscated.").concat(splits[1]); 62 | 63 | BufferedWriter writer = new BufferedWriter(new FileWriter(output)); 64 | writer.write(source); 65 | writer.close(); 66 | } 67 | catch(IOException e) 68 | { 69 | System.out.println(e.getMessage()); 70 | } 71 | 72 | 73 | System.out.println("Obfuscation terminated"); 74 | } 75 | 76 | } 77 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # VBA Obfuscator 2 | VBA Macro obfuscator 3 | 4 | Requires ANTLR4 Runtime library 4.8: https://www.antlr.org/download/antlr-runtime-4.8.jar 5 | 6 | Uses ANTLR to parse a VBA file and obtain an Abstract Syntax Tree that describes the program. Then walks the tree and changes nodes acording to certain 'morphs', i.e. randomize variables names, encode literals, add useless code, etc. 7 | 8 | #### Input 9 | 10 | ``` 11 | Sub Something() 12 | 13 | Dim A As Integer 14 | A = 100 15 | MsgBox A 16 | 17 | End Sub 18 | 19 | Sub MoreSomethingElses() 20 | Dim B As String 21 | B = "Hello world" 22 | MsgBox B 23 | End Sub 24 | 25 | Sub SomethingElse() 26 | Dim A As Boolean 27 | A = True 28 | End Sub 29 | ``` 30 | #### Output 31 | ``` 32 | 33 | Sub qxgsimknfa() 34 | Dim hjqdfzxgly as Integer 35 | hjqdfzxgly = 0 - 6254 - 224 - 55 - 62 - 60 - 11 - 2 - 0 - 1 36 | MsgBox hjqdfzxgly 37 | End Sub 38 | Sub gwogeznbid() 39 | 40 | Dim hpdqnzwdrc As Integer 41 | hpdqnzwdrc = 0 + 21 + 39 + 32 + 6 + 1 + 0 + 1 42 | MsgBox hpdqnzwdrc 43 | 44 | End Sub 45 | Sub zkigfdhxjr() 46 | Dim nidslhsbco as Integer 47 | nidslhsbco = 0 - 2112 - 12060 - 5592 - 758 - 464 - 84 - 2 - 5 48 | MsgBox nidslhsbco 49 | End Sub 50 | 51 | 52 | 53 | Sub vptaksnuca() 54 | Dim tsbfwwtaco as Integer 55 | tsbfwwtaco = 0 + 11147 + 2657 + 4773 + 1746 + 3831 + 832 + 181 + 101 + 13 + 205 56 | MsgBox tsbfwwtaco 57 | End Sub 58 | Sub ffrvhiebgh() 59 | Dim xatbbhvmfa As String 60 | xatbbhvmfa = qakyjxlowy("2248656c6c6f20776f726c6422") 61 | MsgBox xatbbhvmfa 62 | End Sub 63 | Sub aaywxbfilu() 64 | Dim enpatzaeoi as Integer 65 | enpatzaeoi = 0 - 9156 - 1578 - 326 - 27 - 217 - 29 - 40 - 18 66 | MsgBox enpatzaeoi 67 | End Sub 68 | Public Function qakyjxlowy(ByVal luznneuskl As String) As String 69 | Dim sxzbipbglb As String 70 | Dim eyrgjyayae As String 71 | Dim planxfjawg As Long 72 | For planxfjawg = 1 To Len(luznneuskl) Step 2 73 | sxzbipbglb = Chr$(Val("&H" & Mid$(luznneuskl, planxfjawg, 2))) 74 | eyrgjyayae = eyrgjyayae & sxzbipbglb 75 | Next planxfjawg 76 | qakyjxlowy = eyrgjyayae 77 | End Function 78 | 79 | 80 | 81 | 82 | Sub gvixfhkafv() 83 | Dim ulpjmxpgay as Integer 84 | ulpjmxpgay = 0 + 450 + 9291 + 722 + 396 + 50 + 140 + 5 + 0 + 10 + 9 + 1 85 | MsgBox ulpjmxpgay 86 | End Sub 87 | Sub iptcuinysv() 88 | Dim hzxoexpcqt As Boolean 89 | hzxoexpcqt = (((((Not (False Xor False)) And ((False Xor False) Or (False Xor False))) Or (((False Xor True) Xor (False And False)) Or ((True And True) Xor (False Or False)))) Or ((((True Xor False) Or (True Or True)) Xor ((False Or True) Xor (True Xor False))) Xor ((Not (True Or False)) And ((Not False) Or (False And True))))) Or ((Not (((Not False) Xor (True Xor True)) Or (Not (False Xor True)))) Xor ((((False Or False) Xor (True And True)) Or ((True Or False) And (True Xor False))) Xor (Not ((False Or False) Or (False And False)))))) 90 | End Sub 91 | Sub dnmnvsxbhl() 92 | Dim lesrscgots as Integer 93 | lesrscgots = 0 + 15555 + 1632 + 1489 + 2269 + 396 + 703 + 391 + 103 + 11 + 1 + 0 + 1 + 0 + 0 + 1 94 | MsgBox lesrscgots 95 | End Sub 96 | 97 | ``` 98 | -------------------------------------------------------------------------------- /src/VBAObfuscator/Morphs/IDMorph/IDMorphListener.java: -------------------------------------------------------------------------------- 1 | package VBAObfuscator.Morphs.IDMorph; 2 | 3 | import VBAObfuscator.CodeGenerator.CodeGenerator; 4 | import VBAObfuscator.Morphs.MorphListener; 5 | import VBAObfuscator.parser.vbaParser; 6 | import org.antlr.v4.runtime.Token; 7 | import org.antlr.v4.runtime.TokenStreamRewriter; 8 | import org.antlr.v4.runtime.tree.TerminalNode; 9 | 10 | import java.util.List; 11 | import java.util.Random; 12 | 13 | public class IDMorphListener extends MorphListener { 14 | 15 | private final Scope scope; 16 | private final CodeGenerator gen; 17 | 18 | public IDMorphListener(TokenStreamRewriter rewriter) 19 | { 20 | super(rewriter); 21 | 22 | this.scope = new Scope(); 23 | this.scope.pushLevel(); 24 | this.gen = new CodeGenerator(); 25 | } 26 | 27 | public IDMorphListener(TokenStreamRewriter rewriter, Scope scope) 28 | { 29 | super(rewriter); 30 | 31 | this.scope = scope; 32 | this.gen = new CodeGenerator(); 33 | } 34 | 35 | /*@Override public void enterModule(vbaParser.ModuleContext ctx) 36 | { 37 | this.scope.pushLevel(); 38 | } 39 | 40 | @Override public void exitModule(vbaParser.ModuleContext ctx) 41 | { 42 | this.scope.popLevel(); 43 | }*/ 44 | 45 | @Override public void enterSubStmt(vbaParser.SubStmtContext ctx) { 46 | TerminalNode terminalNode = ctx.ambiguousIdentifier().getToken(vbaParser.IDENTIFIER, 0); 47 | Token token = terminalNode.getSymbol(); 48 | 49 | replaceID(token); 50 | 51 | this.scope.pushLevel(); 52 | } 53 | 54 | @Override public void exitSubStmt(vbaParser.SubStmtContext ctx) 55 | { 56 | this.scope.popLevel(); 57 | } 58 | 59 | @Override public void enterFunctionStmt(vbaParser.FunctionStmtContext ctx) 60 | { 61 | TerminalNode terminalNode = ctx.ambiguousIdentifier().getToken(vbaParser.IDENTIFIER, 0); 62 | Token token = terminalNode.getSymbol(); 63 | 64 | replaceID(token); 65 | 66 | this.scope.pushLevel(); 67 | 68 | for(vbaParser.ArgContext arg: ctx.argList().arg()) 69 | { 70 | replaceID(arg.ambiguousIdentifier().getToken(vbaParser.IDENTIFIER, 0).getSymbol()); 71 | } 72 | } 73 | 74 | @Override public void exitFunctionStmt(vbaParser.FunctionStmtContext ctx) 75 | { 76 | this.scope.popLevel(); 77 | } 78 | 79 | @Override public void enterForNextStmt(vbaParser.ForNextStmtContext ctx) 80 | { 81 | for(vbaParser.AmbiguousIdentifierContext id: ctx.ambiguousIdentifier()) 82 | replaceID(id.getToken(vbaParser.IDENTIFIER, 0).getSymbol()); 83 | } 84 | 85 | @Override public void enterVariableSubStmt(vbaParser.VariableSubStmtContext ctx) 86 | { 87 | TerminalNode terminalNode = ctx.ambiguousIdentifier().getToken(vbaParser.IDENTIFIER, 0); 88 | Token token = terminalNode.getSymbol(); 89 | 90 | replaceID(token); 91 | } 92 | 93 | @Override public void enterICS_S_VariableOrProcedureCall(vbaParser.ICS_S_VariableOrProcedureCallContext ctx) 94 | { 95 | if(ctx.ambiguousIdentifier().ambiguousKeyword(0) == null) 96 | { 97 | TerminalNode terminalNode = ctx.ambiguousIdentifier().getToken(vbaParser.IDENTIFIER, 0); 98 | Token token = terminalNode.getSymbol(); 99 | 100 | replaceID(token); 101 | } 102 | } 103 | 104 | private void replaceID(Token token) 105 | { 106 | String qwe = this.gen.generateRandomIdentifier(); 107 | if(this.scope.inScope(token.getText())) 108 | { 109 | qwe = this.scope.get(token.getText()); 110 | } 111 | else 112 | this.scope.insert(token.getText(), qwe); 113 | 114 | rewriter.replace(token, qwe); 115 | } 116 | } 117 | -------------------------------------------------------------------------------- /src/VBAObfuscator/parser/vba.tokens: -------------------------------------------------------------------------------- 1 | T__0=1 2 | T__1=2 3 | T__2=3 4 | T__3=4 5 | T__4=5 6 | T__5=6 7 | T__6=7 8 | T__7=8 9 | ACCESS=9 10 | ADDRESSOF=10 11 | ALIAS=11 12 | AND=12 13 | ATTRIBUTE=13 14 | APPACTIVATE=14 15 | APPEND=15 16 | AS=16 17 | BEGIN=17 18 | BEEP=18 19 | BINARY=19 20 | BOOLEAN=20 21 | BYVAL=21 22 | BYREF=22 23 | BYTE=23 24 | CALL=24 25 | CASE=25 26 | CHDIR=26 27 | CHDRIVE=27 28 | CLASS=28 29 | CLOSE=29 30 | COLLECTION=30 31 | CONST=31 32 | DATABASE=32 33 | DATE=33 34 | DECLARE=34 35 | DEFBOOL=35 36 | DEFBYTE=36 37 | DEFDATE=37 38 | DEFDBL=38 39 | DEFDEC=39 40 | DEFCUR=40 41 | DEFINT=41 42 | DEFLNG=42 43 | DEFOBJ=43 44 | DEFSNG=44 45 | DEFSTR=45 46 | DEFVAR=46 47 | DELETESETTING=47 48 | DIM=48 49 | DO=49 50 | DOUBLE=50 51 | EACH=51 52 | ELSE=52 53 | ELSEIF=53 54 | END_ENUM=54 55 | END_FUNCTION=55 56 | END_IF=56 57 | END_PROPERTY=57 58 | END_SELECT=58 59 | END_SUB=59 60 | END_TYPE=60 61 | END_WITH=61 62 | END=62 63 | ENUM=63 64 | EQV=64 65 | ERASE=65 66 | ERROR=66 67 | EVENT=67 68 | EXIT_DO=68 69 | EXIT_FOR=69 70 | EXIT_FUNCTION=70 71 | EXIT_PROPERTY=71 72 | EXIT_SUB=72 73 | FALSE=73 74 | FILECOPY=74 75 | FRIEND=75 76 | FOR=76 77 | FUNCTION=77 78 | GET=78 79 | GLOBAL=79 80 | GOSUB=80 81 | GOTO=81 82 | IF=82 83 | IMP=83 84 | IMPLEMENTS=84 85 | IN=85 86 | INPUT=86 87 | IS=87 88 | INTEGER=88 89 | KILL=89 90 | LOAD=90 91 | LOCK=91 92 | LONG=92 93 | LOOP=93 94 | LEN=94 95 | LET=95 96 | LIB=96 97 | LIKE=97 98 | LINE_INPUT=98 99 | LOCK_READ=99 100 | LOCK_WRITE=100 101 | LOCK_READ_WRITE=101 102 | LSET=102 103 | MACRO_CONST=103 104 | MACRO_IF=104 105 | MACRO_ELSEIF=105 106 | MACRO_ELSE=106 107 | MACRO_END_IF=107 108 | ME=108 109 | MID=109 110 | MKDIR=110 111 | MOD=111 112 | NAME=112 113 | NEXT=113 114 | NEW=114 115 | NOT=115 116 | NOTHING=116 117 | NULL=117 118 | ON=118 119 | ON_ERROR=119 120 | ON_LOCAL_ERROR=120 121 | OPEN=121 122 | OPTIONAL=122 123 | OPTION_BASE=123 124 | OPTION_EXPLICIT=124 125 | OPTION_COMPARE=125 126 | OPTION_PRIVATE_MODULE=126 127 | OR=127 128 | OUTPUT=128 129 | PARAMARRAY=129 130 | PRESERVE=130 131 | PRINT=131 132 | PRIVATE=132 133 | PROPERTY_GET=133 134 | PROPERTY_LET=134 135 | PROPERTY_SET=135 136 | PTRSAFE=136 137 | PUBLIC=137 138 | PUT=138 139 | RANDOM=139 140 | RANDOMIZE=140 141 | RAISEEVENT=141 142 | READ=142 143 | READ_WRITE=143 144 | REDIM=144 145 | REM=145 146 | RESET=146 147 | RESUME=147 148 | RETURN=148 149 | RMDIR=149 150 | RSET=150 151 | SAVEPICTURE=151 152 | SAVESETTING=152 153 | SEEK=153 154 | SELECT=154 155 | SENDKEYS=155 156 | SET=156 157 | SETATTR=157 158 | SHARED=158 159 | SINGLE=159 160 | SPC=160 161 | STATIC=161 162 | STEP=162 163 | STOP=163 164 | STRING=164 165 | SUB=165 166 | TAB=166 167 | TEXT=167 168 | THEN=168 169 | TIME=169 170 | TO=170 171 | TRUE=171 172 | TYPE=172 173 | TYPEOF=173 174 | UNLOAD=174 175 | UNLOCK=175 176 | UNTIL=176 177 | VARIANT=177 178 | VERSION=178 179 | WEND=179 180 | WHILE=180 181 | WIDTH=181 182 | WITH=182 183 | WITHEVENTS=183 184 | WRITE=184 185 | XOR=185 186 | CHR=186 187 | VAL=187 188 | AMPERSAND=188 189 | ASSIGN=189 190 | DIV=190 191 | EQ=191 192 | GEQ=192 193 | GT=193 194 | LEQ=194 195 | LPAREN=195 196 | LT=196 197 | MINUS=197 198 | MINUS_EQ=198 199 | MULT=199 200 | NEQ=200 201 | PLUS=201 202 | PLUS_EQ=202 203 | POW=203 204 | RPAREN=204 205 | L_SQUARE_BRACKET=205 206 | R_SQUARE_BRACKET=206 207 | STRINGLITERAL=207 208 | OCTLITERAL=208 209 | HEXLITERAL=209 210 | SHORTLITERAL=210 211 | INTEGERLITERAL=211 212 | DOUBLELITERAL=212 213 | DATELITERAL=213 214 | LINE_CONTINUATION=214 215 | NEWLINE=215 216 | REMCOMMENT=216 217 | COMMENT=217 218 | SINGLEQUOTE=218 219 | COLON=219 220 | UNDERSCORE=220 221 | WS=221 222 | IDENTIFIER=222 223 | ','=1 224 | ';'=2 225 | '#'=3 226 | '.'=4 227 | '!'=5 228 | '%'=6 229 | '@'=7 230 | '$'=8 231 | '&'=188 232 | ':='=189 233 | '='=191 234 | '>='=192 235 | '>'=193 236 | '<='=194 237 | '('=195 238 | '<'=196 239 | '-'=197 240 | '-='=198 241 | '*'=199 242 | '<>'=200 243 | '+'=201 244 | '+='=202 245 | '^'=203 246 | ')'=204 247 | '['=205 248 | ']'=206 249 | '\''=218 250 | ':'=219 251 | '_'=220 252 | -------------------------------------------------------------------------------- /src/VBAObfuscator/parser/vbaLexer.tokens: -------------------------------------------------------------------------------- 1 | T__0=1 2 | T__1=2 3 | T__2=3 4 | T__3=4 5 | T__4=5 6 | T__5=6 7 | T__6=7 8 | T__7=8 9 | ACCESS=9 10 | ADDRESSOF=10 11 | ALIAS=11 12 | AND=12 13 | ATTRIBUTE=13 14 | APPACTIVATE=14 15 | APPEND=15 16 | AS=16 17 | BEGIN=17 18 | BEEP=18 19 | BINARY=19 20 | BOOLEAN=20 21 | BYVAL=21 22 | BYREF=22 23 | BYTE=23 24 | CALL=24 25 | CASE=25 26 | CHDIR=26 27 | CHDRIVE=27 28 | CLASS=28 29 | CLOSE=29 30 | COLLECTION=30 31 | CONST=31 32 | DATABASE=32 33 | DATE=33 34 | DECLARE=34 35 | DEFBOOL=35 36 | DEFBYTE=36 37 | DEFDATE=37 38 | DEFDBL=38 39 | DEFDEC=39 40 | DEFCUR=40 41 | DEFINT=41 42 | DEFLNG=42 43 | DEFOBJ=43 44 | DEFSNG=44 45 | DEFSTR=45 46 | DEFVAR=46 47 | DELETESETTING=47 48 | DIM=48 49 | DO=49 50 | DOUBLE=50 51 | EACH=51 52 | ELSE=52 53 | ELSEIF=53 54 | END_ENUM=54 55 | END_FUNCTION=55 56 | END_IF=56 57 | END_PROPERTY=57 58 | END_SELECT=58 59 | END_SUB=59 60 | END_TYPE=60 61 | END_WITH=61 62 | END=62 63 | ENUM=63 64 | EQV=64 65 | ERASE=65 66 | ERROR=66 67 | EVENT=67 68 | EXIT_DO=68 69 | EXIT_FOR=69 70 | EXIT_FUNCTION=70 71 | EXIT_PROPERTY=71 72 | EXIT_SUB=72 73 | FALSE=73 74 | FILECOPY=74 75 | FRIEND=75 76 | FOR=76 77 | FUNCTION=77 78 | GET=78 79 | GLOBAL=79 80 | GOSUB=80 81 | GOTO=81 82 | IF=82 83 | IMP=83 84 | IMPLEMENTS=84 85 | IN=85 86 | INPUT=86 87 | IS=87 88 | INTEGER=88 89 | KILL=89 90 | LOAD=90 91 | LOCK=91 92 | LONG=92 93 | LOOP=93 94 | LEN=94 95 | LET=95 96 | LIB=96 97 | LIKE=97 98 | LINE_INPUT=98 99 | LOCK_READ=99 100 | LOCK_WRITE=100 101 | LOCK_READ_WRITE=101 102 | LSET=102 103 | MACRO_CONST=103 104 | MACRO_IF=104 105 | MACRO_ELSEIF=105 106 | MACRO_ELSE=106 107 | MACRO_END_IF=107 108 | ME=108 109 | MID=109 110 | MKDIR=110 111 | MOD=111 112 | NAME=112 113 | NEXT=113 114 | NEW=114 115 | NOT=115 116 | NOTHING=116 117 | NULL=117 118 | ON=118 119 | ON_ERROR=119 120 | ON_LOCAL_ERROR=120 121 | OPEN=121 122 | OPTIONAL=122 123 | OPTION_BASE=123 124 | OPTION_EXPLICIT=124 125 | OPTION_COMPARE=125 126 | OPTION_PRIVATE_MODULE=126 127 | OR=127 128 | OUTPUT=128 129 | PARAMARRAY=129 130 | PRESERVE=130 131 | PRINT=131 132 | PRIVATE=132 133 | PROPERTY_GET=133 134 | PROPERTY_LET=134 135 | PROPERTY_SET=135 136 | PTRSAFE=136 137 | PUBLIC=137 138 | PUT=138 139 | RANDOM=139 140 | RANDOMIZE=140 141 | RAISEEVENT=141 142 | READ=142 143 | READ_WRITE=143 144 | REDIM=144 145 | REM=145 146 | RESET=146 147 | RESUME=147 148 | RETURN=148 149 | RMDIR=149 150 | RSET=150 151 | SAVEPICTURE=151 152 | SAVESETTING=152 153 | SEEK=153 154 | SELECT=154 155 | SENDKEYS=155 156 | SET=156 157 | SETATTR=157 158 | SHARED=158 159 | SINGLE=159 160 | SPC=160 161 | STATIC=161 162 | STEP=162 163 | STOP=163 164 | STRING=164 165 | SUB=165 166 | TAB=166 167 | TEXT=167 168 | THEN=168 169 | TIME=169 170 | TO=170 171 | TRUE=171 172 | TYPE=172 173 | TYPEOF=173 174 | UNLOAD=174 175 | UNLOCK=175 176 | UNTIL=176 177 | VARIANT=177 178 | VERSION=178 179 | WEND=179 180 | WHILE=180 181 | WIDTH=181 182 | WITH=182 183 | WITHEVENTS=183 184 | WRITE=184 185 | XOR=185 186 | CHR=186 187 | VAL=187 188 | AMPERSAND=188 189 | ASSIGN=189 190 | DIV=190 191 | EQ=191 192 | GEQ=192 193 | GT=193 194 | LEQ=194 195 | LPAREN=195 196 | LT=196 197 | MINUS=197 198 | MINUS_EQ=198 199 | MULT=199 200 | NEQ=200 201 | PLUS=201 202 | PLUS_EQ=202 203 | POW=203 204 | RPAREN=204 205 | L_SQUARE_BRACKET=205 206 | R_SQUARE_BRACKET=206 207 | STRINGLITERAL=207 208 | OCTLITERAL=208 209 | HEXLITERAL=209 210 | SHORTLITERAL=210 211 | INTEGERLITERAL=211 212 | DOUBLELITERAL=212 213 | DATELITERAL=213 214 | LINE_CONTINUATION=214 215 | NEWLINE=215 216 | REMCOMMENT=216 217 | COMMENT=217 218 | SINGLEQUOTE=218 219 | COLON=219 220 | UNDERSCORE=220 221 | WS=221 222 | IDENTIFIER=222 223 | ','=1 224 | ';'=2 225 | '#'=3 226 | '.'=4 227 | '!'=5 228 | '%'=6 229 | '@'=7 230 | '$'=8 231 | '&'=188 232 | ':='=189 233 | '='=191 234 | '>='=192 235 | '>'=193 236 | '<='=194 237 | '('=195 238 | '<'=196 239 | '-'=197 240 | '-='=198 241 | '*'=199 242 | '<>'=200 243 | '+'=201 244 | '+='=202 245 | '^'=203 246 | ')'=204 247 | '['=205 248 | ']'=206 249 | '\''=218 250 | ':'=219 251 | '_'=220 252 | -------------------------------------------------------------------------------- /src/VBAObfuscator/Morphs/LiteralEncoderMorph/LiteralEncoderMorphListener.java: -------------------------------------------------------------------------------- 1 | package VBAObfuscator.Morphs.LiteralEncoderMorph; 2 | 3 | import VBAObfuscator.Morphs.MorphListener; 4 | import VBAObfuscator.parser.vbaParser; 5 | import org.antlr.v4.runtime.TokenStreamRewriter; 6 | import org.antlr.v4.runtime.tree.TerminalNode; 7 | 8 | import java.math.BigInteger; 9 | import java.util.List; 10 | import java.util.Random; 11 | 12 | public class LiteralEncoderMorphListener extends MorphListener { 13 | 14 | // https://www.vbforums.com/showthread.php?466942-Hex-and-String-Conversions 15 | private static String vbaHex2Str = "\nPublic Function HexToString(ByVal HexToStr As String) As String\n" + 16 | "Dim strTemp As String\n" + 17 | "Dim strReturn As String\n" + 18 | "Dim I As Long\n" + 19 | " For I = 1 To Len(HexToStr) Step 2\n" + 20 | " strTemp = Chr$(Val(\"&H\" & Mid$(HexToStr, I, 2)))\n" + 21 | " strReturn = strReturn & strTemp\n" + 22 | " Next I\n" + 23 | " HexToString = strReturn\n" + 24 | "End Function\n"; 25 | 26 | public LiteralEncoderMorphListener(TokenStreamRewriter rewriter) { 27 | super(rewriter); 28 | } 29 | 30 | @Override 31 | public void enterModuleBody(vbaParser.ModuleBodyContext ctx) { 32 | List moduleElements = ctx.moduleBodyElement(); 33 | 34 | Random r = new Random(); 35 | rewriter.insertAfter(moduleElements.get(r.nextInt(moduleElements.size())).getStop(), vbaHex2Str); 36 | } 37 | 38 | @Override 39 | public void enterVsLiteral(vbaParser.VsLiteralContext ctx) { 40 | if(ctx.literal().SHORTLITERAL() != null) 41 | replaceShortLiteral(ctx.literal().getToken(vbaParser.SHORTLITERAL, 0)); 42 | else if(ctx.literal().FALSE() != null) 43 | replaceBooleanLiteral(ctx.literal().getToken(vbaParser.FALSE, 0)); 44 | else if(ctx.literal().TRUE() != null) 45 | replaceBooleanLiteral(ctx.literal().getToken(vbaParser.TRUE, 0)); 46 | else if(ctx.literal().STRINGLITERAL() != null) 47 | replaceStringLiteral(ctx.literal().getToken(vbaParser.STRINGLITERAL, 0)); 48 | } 49 | 50 | private void replaceShortLiteral(TerminalNode shortLiteral) 51 | { 52 | short n = Short.parseShort(shortLiteral.getText()); 53 | rewriter.replace(shortLiteral.getSymbol(), encodeShort(n)); 54 | } 55 | 56 | private void replaceBooleanLiteral(TerminalNode booleanLiteral) 57 | { 58 | boolean b = Boolean.parseBoolean(booleanLiteral.getText()); 59 | rewriter.replace(booleanLiteral.getSymbol(), encodeBoolean(b)); 60 | } 61 | 62 | private void replaceStringLiteral(TerminalNode stringLiteral) 63 | { 64 | String hex = String.format("%x", new BigInteger(1, stringLiteral.getText().getBytes())); 65 | rewriter.replace(stringLiteral.getSymbol(), "HexToString(\"" + hex + "\")"); 66 | } 67 | 68 | private String encodeBoolean(boolean b) 69 | { 70 | return encodeBoolean(b, 0); 71 | } 72 | 73 | private String encodeBoolean(boolean b, int rec_lvl) 74 | { 75 | if(rec_lvl == 6) /* base case */ 76 | { 77 | if(b) 78 | return "True"; 79 | else 80 | return "False"; 81 | } 82 | 83 | StringBuilder builder = new StringBuilder(); 84 | builder.append("("); 85 | 86 | Random r = new Random(); 87 | int sel = r.nextInt(7); 88 | if(b) 89 | { 90 | switch (sel) { 91 | /* true & true */ 92 | case 0 -> builder.append(encodeBoolean(true, rec_lvl + 1)).append(" And ").append(encodeBoolean(true, rec_lvl + 1)); 93 | /* false | true */ 94 | case 1 -> builder.append(encodeBoolean(false, rec_lvl + 1)).append(" Or ").append(encodeBoolean(true, rec_lvl + 1)); 95 | /* true | false */ 96 | case 2 -> builder.append(encodeBoolean(true, rec_lvl + 1)).append(" Or ").append(encodeBoolean(false, rec_lvl + 1)); 97 | /* true | true */ 98 | case 3 -> builder.append(encodeBoolean(true, rec_lvl + 1)).append(" Or ").append(encodeBoolean(true, rec_lvl + 1)); 99 | /* !false */ 100 | case 4 -> builder.append("Not ").append(encodeBoolean(false, rec_lvl + 1)); 101 | /* false ^ true */ 102 | case 5 -> builder.append(encodeBoolean(false, rec_lvl + 1)).append(" Xor ").append(encodeBoolean(true, rec_lvl + 1)); 103 | /* true ^ false */ 104 | case 6 -> builder.append(encodeBoolean(true, rec_lvl + 1)).append(" Xor ").append(encodeBoolean(false, rec_lvl + 1)); 105 | } 106 | } 107 | else 108 | { 109 | switch (sel) { 110 | /* true & false */ 111 | case 0 -> builder.append(encodeBoolean(true, rec_lvl + 1)).append(" And ").append(encodeBoolean(false, rec_lvl + 1)); 112 | /* false & true */ 113 | case 1 -> builder.append(encodeBoolean(false, rec_lvl + 1)).append(" And ").append(encodeBoolean(true, rec_lvl + 1)); 114 | /* false & false */ 115 | case 2 -> builder.append(encodeBoolean(false, rec_lvl + 1)).append(" And ").append(encodeBoolean(false, rec_lvl + 1)); 116 | /* false | false */ 117 | case 3 -> builder.append(encodeBoolean(false, rec_lvl + 1)).append(" Or ").append(encodeBoolean(false, rec_lvl + 1)); 118 | /* !true */ 119 | case 4 -> builder.append("Not ").append(encodeBoolean(true, rec_lvl + 1)); 120 | /* false ^ false */ 121 | case 5 -> builder.append(encodeBoolean(false, rec_lvl + 1)).append(" Xor ").append(encodeBoolean(false, rec_lvl + 1)); 122 | /* true ^ true */ 123 | case 6 -> builder.append(encodeBoolean(true, rec_lvl + 1)).append(" Xor ").append(encodeBoolean(true, rec_lvl + 1)); 124 | } 125 | } 126 | builder.append(")"); 127 | return builder.toString(); 128 | } 129 | 130 | private String encodeShort(short n) 131 | { 132 | StringBuilder builder = new StringBuilder(); 133 | Random r = new Random(); 134 | short n2 = 0; 135 | builder.append(0); 136 | 137 | while(n2 != n) 138 | { 139 | int i = r.nextInt((Math.abs(n) - Math.abs(n2)) + 1); 140 | if(n > 0) 141 | { 142 | builder.append(" + "); 143 | n2 += i; 144 | } 145 | else 146 | { 147 | builder.append(" - "); 148 | n2 -= i; 149 | } 150 | builder.append(String.valueOf(i)); 151 | } 152 | 153 | return builder.toString(); 154 | } 155 | 156 | } 157 | -------------------------------------------------------------------------------- /src/VBAObfuscator/parser/vba.g4: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2014 Ulrich Wolffgang 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | /* 19 | * Visual Basic 6.0 Grammar for ANTLR4 20 | * 21 | * This is an approximate grammar for Visual Basic 6.0, derived 22 | * from the Visual Basic 6.0 language reference 23 | * http://msdn.microsoft.com/en-us/library/aa338033%28v=vs.60%29.aspx 24 | * and tested against MSDN VB6 statement examples as well as several Visual 25 | * Basic 6.0 code repositories. 26 | * 27 | * Characteristics: 28 | * 29 | * 1. This grammar is line-based and takes into account whitespace, so that 30 | * member calls (e.g. "A.B") are distinguished from contextual object calls 31 | * in WITH statements (e.g. "A .B"). 32 | * 33 | * 2. Keywords can be used as identifiers depending on the context, enabling 34 | * e.g. "A.Type", but not "Type.B". 35 | * 36 | * 37 | * Known limitations: 38 | * 39 | * 1. Preprocessor statements (#if, #else, ...) must not interfere with regular 40 | * statements. 41 | * 42 | * Change log: 43 | * 44 | * v1.4 Rubberduck 45 | * - renamed to VBA; goal is to support VBA, and a shorter name is more practical. 46 | * - added moduleDeclarations rule, moved moduleOptions there; options can now be 47 | * located anywhere in declarations section, without breaking the parser. 48 | * - added support for Option Compare Database. 49 | * - added support for VBA 7.0 PtrSafe attribute for Declare statements. 50 | * - implemented a fileNumber rule to locate identifier usages in file numbers. 51 | * - added support for anonymous declarations in With blocks (With New Something) 52 | * - blockStmt rules being sorted alphabetically was wrong. moved implicit call statement last. 53 | * - '!' in dictionary call statement rule gets picked up as a type hint; changed member call 54 | * to accept '!' as well as '.', but this complicates resolving the '!' shorthand syntax. 55 | * - added a subscripts rule in procedure calls, to avoid breaking the parser with 56 | * a function call that returns an array that is immediately accessed. 57 | * - added missing macroConstStmt (#CONST) rule. 58 | * - amended selectCaseStmt rules to support all valid syntaxes. 59 | * - blockStmt is now illegal in declarations section. 60 | * - added ON_LOCAL_ERROR token, to support legacy ON LOCAL ERROR statements. 61 | * - added additional typeHint? token to declareStmt, to support "Declare Function Foo$". 62 | * - modified WS lexer rule to correctly account for line continuations; 63 | * - modified multi-word lexer rules to use WS lexer token instead of ' '; this makes 64 | * the grammar support "Option _\n Explicit" and other keywords being specified on multiple lines. 65 | * - modified moduleOption rules to account for WS token in corresponding lexer rules. 66 | * - modified NEWLINE lexer rule to properly support instructions separator (':'). 67 | * - tightened DATELITERAL lexer rule to the format enforced by the VBE, because "#fn: Close #" 68 | * in "Dim fn: fn = FreeFile: Open "filename" For Output As #fn: Close #fn" was picked up as a date literal. 69 | * - redefined IDENTIFIER lexer rule to support non-Latin characters (e.g. Japanese) 70 | * - made seekStmt, lockStmt, unlockStmt, getStmt and widthStmt accept a fileNumber (needed to support '#') 71 | * - fixed precompiler directives, which can now be nested. they still can't interfere with other blocks though. 72 | * - optional parameters can be a valueStmt. 73 | * - added support for Octal and Currency literals. 74 | * - implemented proper specs for DATELITERAL. 75 | * - added comments to parse tree (removes known limitation #2). 76 | * - macroConstStmt now allowed in blockStmt. 77 | * - allow type hints for parameters. 78 | * 79 | *====================================================================================== 80 | * 81 | * v1.3 82 | * - call statement precedence 83 | * 84 | * v1.2 85 | * - refined call statements 86 | * 87 | * v1.1 88 | * - precedence of operators and of ELSE in select statements 89 | * - optimized member calls 90 | * 91 | * v1.0 Initial revision 92 | */ 93 | 94 | grammar vba; 95 | 96 | // module ---------------------------------- 97 | 98 | startRule : module EOF; 99 | 100 | module : 101 | WS? 102 | endOfLine* 103 | (moduleHeader endOfLine*)? 104 | moduleConfig? endOfLine* 105 | moduleAttributes? endOfLine* 106 | moduleDeclarations? endOfLine* 107 | moduleBody? endOfLine* 108 | WS? 109 | ; 110 | 111 | moduleHeader : VERSION WS DOUBLELITERAL WS CLASS; 112 | 113 | moduleConfig : 114 | BEGIN endOfLine* 115 | moduleConfigElement+ 116 | END 117 | ; 118 | 119 | moduleConfigElement : 120 | ambiguousIdentifier WS? EQ WS? literal endOfLine* 121 | ; 122 | 123 | moduleAttributes : (attributeStmt endOfLine+)+; 124 | 125 | moduleDeclarations : moduleDeclarationsElement (endOfLine+ moduleDeclarationsElement)* endOfLine*; 126 | 127 | moduleOption : 128 | OPTION_BASE WS SHORTLITERAL # optionBaseStmt 129 | | OPTION_COMPARE WS (BINARY | TEXT | DATABASE) # optionCompareStmt 130 | | OPTION_EXPLICIT # optionExplicitStmt 131 | | OPTION_PRIVATE_MODULE # optionPrivateModuleStmt 132 | ; 133 | 134 | moduleDeclarationsElement : 135 | comment 136 | | declareStmt 137 | | enumerationStmt 138 | | eventStmt 139 | | constStmt 140 | | implementsStmt 141 | | variableStmt 142 | | moduleOption 143 | | typeStmt 144 | | macroStmt 145 | ; 146 | 147 | macroStmt : 148 | macroConstStmt 149 | | macroIfThenElseStmt; 150 | 151 | moduleBody : 152 | moduleBodyElement (endOfLine+ moduleBodyElement)* endOfLine*; 153 | 154 | moduleBodyElement : 155 | functionStmt 156 | | propertyGetStmt 157 | | propertySetStmt 158 | | propertyLetStmt 159 | | subStmt 160 | | macroStmt 161 | ; 162 | 163 | 164 | // block ---------------------------------- 165 | 166 | attributeStmt : ATTRIBUTE WS implicitCallStmt_InStmt WS? EQ WS? literal (WS? ',' WS? literal)*; 167 | 168 | block : blockStmt (endOfStatement blockStmt)* endOfStatement; 169 | 170 | blockStmt : 171 | lineLabel 172 | | appactivateStmt 173 | | attributeStmt 174 | | beepStmt 175 | | chdirStmt 176 | | chdriveStmt 177 | | closeStmt 178 | | constStmt 179 | | dateStmt 180 | | deleteSettingStmt 181 | | deftypeStmt 182 | | doLoopStmt 183 | | endStmt 184 | | eraseStmt 185 | | errorStmt 186 | | exitStmt 187 | | explicitCallStmt 188 | | filecopyStmt 189 | | forEachStmt 190 | | forNextStmt 191 | | getStmt 192 | | goSubStmt 193 | | goToStmt 194 | | ifThenElseStmt 195 | | implementsStmt 196 | | inputStmt 197 | | killStmt 198 | | letStmt 199 | | lineInputStmt 200 | | loadStmt 201 | | lockStmt 202 | | lsetStmt 203 | | macroStmt 204 | | midStmt 205 | | mkdirStmt 206 | | nameStmt 207 | | onErrorStmt 208 | | onGoToStmt 209 | | onGoSubStmt 210 | | openStmt 211 | | printStmt 212 | | putStmt 213 | | raiseEventStmt 214 | | randomizeStmt 215 | | redimStmt 216 | | resetStmt 217 | | resumeStmt 218 | | returnStmt 219 | | rmdirStmt 220 | | rsetStmt 221 | | savepictureStmt 222 | | saveSettingStmt 223 | | seekStmt 224 | | selectCaseStmt 225 | | sendkeysStmt 226 | | setattrStmt 227 | | setStmt 228 | | stopStmt 229 | | timeStmt 230 | | unloadStmt 231 | | unlockStmt 232 | | variableStmt 233 | | whileWendStmt 234 | | widthStmt 235 | | withStmt 236 | | writeStmt 237 | | implicitCallStmt_InBlock 238 | | implicitCallStmt_InStmt 239 | ; 240 | 241 | 242 | // statements ---------------------------------- 243 | 244 | appactivateStmt : APPACTIVATE WS valueStmt (WS? ',' WS? valueStmt)?; 245 | 246 | beepStmt : BEEP; 247 | 248 | chdirStmt : CHDIR WS valueStmt; 249 | 250 | chdriveStmt : CHDRIVE WS valueStmt; 251 | 252 | closeStmt : CLOSE (WS fileNumber (WS? ',' WS? fileNumber)*)?; 253 | 254 | constStmt : (visibility WS)? CONST WS constSubStmt (WS? ',' WS? constSubStmt)*; 255 | 256 | constSubStmt : ambiguousIdentifier typeHint? (WS asTypeClause)? WS? EQ WS? valueStmt; 257 | 258 | dateStmt : DATE WS? EQ WS? valueStmt; 259 | 260 | declareStmt : (visibility WS)? DECLARE WS (PTRSAFE WS)? ((FUNCTION typeHint?) | SUB) WS ambiguousIdentifier typeHint? WS LIB WS STRINGLITERAL (WS ALIAS WS STRINGLITERAL)? (WS? argList)? (WS asTypeClause)?; 261 | 262 | deftypeStmt : 263 | ( 264 | DEFBOOL | DEFBYTE | DEFINT | DEFLNG | DEFCUR | 265 | DEFSNG | DEFDBL | DEFDEC | DEFDATE | 266 | DEFSTR | DEFOBJ | DEFVAR 267 | ) WS 268 | letterrange (WS? ',' WS? letterrange)* 269 | ; 270 | 271 | deleteSettingStmt : DELETESETTING WS valueStmt WS? ',' WS? valueStmt (WS? ',' WS? valueStmt)?; 272 | 273 | doLoopStmt : 274 | DO endOfStatement 275 | block? 276 | LOOP 277 | | 278 | DO WS (WHILE | UNTIL) WS valueStmt endOfStatement 279 | block? 280 | LOOP 281 | | 282 | DO endOfStatement 283 | block 284 | LOOP WS (WHILE | UNTIL) WS valueStmt 285 | ; 286 | 287 | endStmt : END; 288 | 289 | enumerationStmt: 290 | (visibility WS)? ENUM WS ambiguousIdentifier endOfStatement 291 | enumerationStmt_Constant* 292 | END_ENUM 293 | ; 294 | 295 | enumerationStmt_Constant : ambiguousIdentifier (WS? EQ WS? valueStmt)? endOfStatement; 296 | 297 | eraseStmt : ERASE WS valueStmt (',' WS? valueStmt)*?; 298 | 299 | errorStmt : ERROR WS valueStmt; 300 | 301 | eventStmt : (visibility WS)? EVENT WS ambiguousIdentifier WS? argList; 302 | 303 | exitStmt : EXIT_DO | EXIT_FOR | EXIT_FUNCTION | EXIT_PROPERTY | EXIT_SUB; 304 | 305 | filecopyStmt : FILECOPY WS valueStmt WS? ',' WS? valueStmt; 306 | 307 | forEachStmt : 308 | FOR WS EACH WS ambiguousIdentifier typeHint? WS IN WS valueStmt endOfStatement 309 | block? 310 | NEXT (WS ambiguousIdentifier)? 311 | ; 312 | 313 | forNextStmt : 314 | FOR WS ambiguousIdentifier typeHint? (WS asTypeClause)? WS? EQ WS? valueStmt WS TO WS valueStmt (WS STEP WS valueStmt)? endOfStatement 315 | block? 316 | NEXT (WS ambiguousIdentifier)? 317 | ; 318 | 319 | functionStmt : 320 | (visibility WS)? (STATIC WS)? FUNCTION WS? ambiguousIdentifier typeHint? (WS? argList)? (WS? asTypeClause)? endOfStatement 321 | block? 322 | END_FUNCTION 323 | ; 324 | 325 | getStmt : GET WS fileNumber WS? ',' WS? valueStmt? WS? ',' WS? valueStmt; 326 | 327 | goSubStmt : GOSUB WS valueStmt; 328 | 329 | goToStmt : GOTO WS valueStmt; 330 | 331 | ifThenElseStmt : 332 | IF WS ifConditionStmt WS THEN WS blockStmt (WS ELSE WS blockStmt)? # inlineIfThenElse 333 | | ifBlockStmt ifElseIfBlockStmt* ifElseBlockStmt? END_IF # blockIfThenElse 334 | ; 335 | 336 | ifBlockStmt : 337 | IF WS ifConditionStmt WS THEN endOfStatement 338 | block? 339 | ; 340 | 341 | ifConditionStmt : valueStmt; 342 | 343 | ifElseIfBlockStmt : 344 | ELSEIF WS ifConditionStmt WS THEN endOfStatement 345 | block? 346 | ; 347 | 348 | ifElseBlockStmt : 349 | ELSE endOfStatement 350 | block? 351 | ; 352 | 353 | implementsStmt : IMPLEMENTS WS ambiguousIdentifier; 354 | 355 | inputStmt : INPUT WS fileNumber (WS? ',' WS? valueStmt)+; 356 | 357 | killStmt : KILL WS valueStmt; 358 | 359 | letStmt : (LET WS)? implicitCallStmt_InStmt WS? (EQ | PLUS_EQ | MINUS_EQ) WS? valueStmt; 360 | 361 | lineInputStmt : LINE_INPUT WS fileNumber WS? ',' WS? valueStmt; 362 | 363 | loadStmt : LOAD WS valueStmt; 364 | 365 | lockStmt : LOCK WS valueStmt (WS? ',' WS? valueStmt (WS TO WS valueStmt)?)?; 366 | 367 | lsetStmt : LSET WS implicitCallStmt_InStmt WS? EQ WS? valueStmt; 368 | 369 | macroConstStmt : MACRO_CONST WS? ambiguousIdentifier WS? EQ WS? valueStmt; 370 | 371 | macroIfThenElseStmt : macroIfBlockStmt macroElseIfBlockStmt* macroElseBlockStmt? MACRO_END_IF; 372 | 373 | macroIfBlockStmt : 374 | MACRO_IF WS? ifConditionStmt WS THEN endOfStatement 375 | (moduleDeclarations | moduleBody | block)* 376 | ; 377 | 378 | macroElseIfBlockStmt : 379 | MACRO_ELSEIF WS? ifConditionStmt WS THEN endOfStatement 380 | (moduleDeclarations | moduleBody | block)* 381 | ; 382 | 383 | macroElseBlockStmt : 384 | MACRO_ELSE endOfStatement 385 | (moduleDeclarations | moduleBody | block)* 386 | ; 387 | 388 | midStmt : MID WS? LPAREN WS? argsCall WS? RPAREN; 389 | 390 | mkdirStmt : MKDIR WS valueStmt; 391 | 392 | nameStmt : NAME WS valueStmt WS AS WS valueStmt; 393 | 394 | onErrorStmt : (ON_ERROR | ON_LOCAL_ERROR) WS (GOTO WS valueStmt | RESUME WS NEXT); 395 | 396 | onGoToStmt : ON WS valueStmt WS GOTO WS valueStmt (WS? ',' WS? valueStmt)*; 397 | 398 | onGoSubStmt : ON WS valueStmt WS GOSUB WS valueStmt (WS? ',' WS? valueStmt)*; 399 | 400 | openStmt : 401 | OPEN WS valueStmt WS FOR WS (APPEND | BINARY | INPUT | OUTPUT | RANDOM) 402 | (WS ACCESS WS (READ | WRITE | READ_WRITE))? 403 | (WS (SHARED | LOCK_READ | LOCK_WRITE | LOCK_READ_WRITE))? 404 | WS AS WS fileNumber 405 | (WS LEN WS? EQ WS? valueStmt)? 406 | ; 407 | 408 | outputList : 409 | outputList_Expression (WS? (';' | ',') WS? outputList_Expression?)* 410 | | outputList_Expression? (WS? (';' | ',') WS? outputList_Expression?)+ 411 | ; 412 | 413 | outputList_Expression : 414 | valueStmt 415 | | (SPC | TAB) (WS? LPAREN WS? argsCall WS? RPAREN)? 416 | ; 417 | 418 | printStmt : PRINT WS fileNumber WS? ',' (WS? outputList)?; 419 | 420 | propertyGetStmt : 421 | (visibility WS)? (STATIC WS)? PROPERTY_GET WS ambiguousIdentifier typeHint? (WS? argList)? (WS asTypeClause)? endOfStatement 422 | block? 423 | END_PROPERTY 424 | ; 425 | 426 | propertySetStmt : 427 | (visibility WS)? (STATIC WS)? PROPERTY_SET WS ambiguousIdentifier (WS? argList)? endOfStatement 428 | block? 429 | END_PROPERTY 430 | ; 431 | 432 | propertyLetStmt : 433 | (visibility WS)? (STATIC WS)? PROPERTY_LET WS ambiguousIdentifier (WS? argList)? endOfStatement 434 | block? 435 | END_PROPERTY 436 | ; 437 | 438 | putStmt : PUT WS fileNumber WS? ',' WS? valueStmt? WS? ',' WS? valueStmt; 439 | 440 | raiseEventStmt : RAISEEVENT WS ambiguousIdentifier (WS? LPAREN WS? (argsCall WS?)? RPAREN)?; 441 | 442 | randomizeStmt : RANDOMIZE (WS valueStmt)?; 443 | 444 | redimStmt : REDIM WS (PRESERVE WS)? redimSubStmt (WS?',' WS? redimSubStmt)*; 445 | 446 | redimSubStmt : implicitCallStmt_InStmt WS? LPAREN WS? subscripts WS? RPAREN (WS asTypeClause)?; 447 | 448 | resetStmt : RESET; 449 | 450 | resumeStmt : RESUME (WS (NEXT | ambiguousIdentifier))?; 451 | 452 | returnStmt : RETURN; 453 | 454 | rmdirStmt : RMDIR WS valueStmt; 455 | 456 | rsetStmt : RSET WS implicitCallStmt_InStmt WS? EQ WS? valueStmt; 457 | 458 | savepictureStmt : SAVEPICTURE WS valueStmt WS? ',' WS? valueStmt; 459 | 460 | saveSettingStmt : SAVESETTING WS valueStmt WS? ',' WS? valueStmt WS? ',' WS? valueStmt WS? ',' WS? valueStmt; 461 | 462 | seekStmt : SEEK WS fileNumber WS? ',' WS? valueStmt; 463 | 464 | selectCaseStmt : 465 | SELECT WS CASE WS valueStmt endOfStatement 466 | sC_Case* 467 | END_SELECT 468 | ; 469 | 470 | sC_Selection : 471 | IS WS? comparisonOperator WS? valueStmt # caseCondIs 472 | | valueStmt WS TO WS valueStmt # caseCondTo 473 | | valueStmt # caseCondValue 474 | ; 475 | 476 | sC_Case : 477 | CASE WS sC_Cond endOfStatement 478 | block? 479 | ; 480 | 481 | // ELSE first, so that it is not interpreted as a variable call 482 | sC_Cond : 483 | ELSE # caseCondElse 484 | | sC_Selection (WS? ',' WS? sC_Selection)* # caseCondSelection 485 | ; 486 | 487 | sendkeysStmt : SENDKEYS WS valueStmt (WS? ',' WS? valueStmt)?; 488 | 489 | setattrStmt : SETATTR WS valueStmt WS? ',' WS? valueStmt; 490 | 491 | setStmt : SET WS implicitCallStmt_InStmt WS? EQ WS? valueStmt; 492 | 493 | stopStmt : STOP; 494 | 495 | subStmt : 496 | (visibility WS)? (STATIC WS)? SUB WS? ambiguousIdentifier (WS? argList)? endOfStatement 497 | block? 498 | END_SUB 499 | ; 500 | 501 | timeStmt : TIME WS? EQ WS? valueStmt; 502 | 503 | typeStmt : 504 | (visibility WS)? TYPE WS ambiguousIdentifier endOfStatement 505 | typeStmt_Element* 506 | END_TYPE 507 | ; 508 | 509 | typeStmt_Element : ambiguousIdentifier (WS? LPAREN (WS? subscripts)? WS? RPAREN)? (WS asTypeClause)? endOfStatement; 510 | 511 | typeOfStmt : TYPEOF WS valueStmt (WS IS WS type)?; 512 | 513 | unloadStmt : UNLOAD WS valueStmt; 514 | 515 | unlockStmt : UNLOCK WS fileNumber (WS? ',' WS? valueStmt (WS TO WS valueStmt)?)?; 516 | 517 | // operator precedence is represented by rule order 518 | valueStmt : 519 | literal # vsLiteral 520 | | implicitCallStmt_InStmt # vsICS 521 | | LPAREN WS? valueStmt (WS? ',' WS? valueStmt)* RPAREN # vsStruct 522 | | NEW WS? valueStmt # vsNew 523 | | typeOfStmt # vsTypeOf 524 | | midStmt # vsMid 525 | | ADDRESSOF WS? valueStmt # vsAddressOf 526 | | implicitCallStmt_InStmt WS? ASSIGN WS? valueStmt # vsAssign 527 | 528 | | valueStmt WS? IS WS? valueStmt # vsIs 529 | | valueStmt WS? LIKE WS? valueStmt # vsLike 530 | | valueStmt WS? GEQ WS? valueStmt # vsGeq 531 | | valueStmt WS? LEQ WS? valueStmt # vsLeq 532 | | valueStmt WS? GT WS? valueStmt # vsGt 533 | | valueStmt WS? LT WS? valueStmt # vsLt 534 | | valueStmt WS? NEQ WS? valueStmt # vsNeq 535 | | valueStmt WS? EQ WS? valueStmt # vsEq 536 | 537 | | valueStmt WS? POW WS? valueStmt # vsPow 538 | | MINUS WS? valueStmt # vsNegation 539 | | PLUS WS? valueStmt # vsPlus 540 | | valueStmt WS? DIV WS? valueStmt # vsDiv 541 | | valueStmt WS? MULT WS? valueStmt # vsMult 542 | | valueStmt WS? MOD WS? valueStmt # vsMod 543 | | valueStmt WS? PLUS WS? valueStmt # vsAdd 544 | | valueStmt WS? MINUS WS? valueStmt # vsMinus 545 | | valueStmt WS? AMPERSAND WS? valueStmt # vsAmp 546 | 547 | | valueStmt WS? IMP WS? valueStmt # vsImp 548 | | valueStmt WS? EQV WS? valueStmt # vsEqv 549 | | valueStmt WS? XOR WS? valueStmt # vsXor 550 | | valueStmt WS? OR WS? valueStmt # vsOr 551 | | valueStmt WS? AND WS? valueStmt # vsAnd 552 | | NOT WS? valueStmt # vsNot 553 | ; 554 | 555 | variableStmt : (DIM | STATIC | visibility) WS (WITHEVENTS WS)? variableListStmt; 556 | 557 | variableListStmt : variableSubStmt (WS? ',' WS? variableSubStmt)*; 558 | 559 | variableSubStmt : ambiguousIdentifier (WS? LPAREN WS? (subscripts WS?)? RPAREN WS?)? typeHint? (WS asTypeClause)?; 560 | 561 | whileWendStmt : 562 | WHILE WS valueStmt endOfStatement 563 | block? 564 | WEND 565 | ; 566 | 567 | widthStmt : WIDTH WS fileNumber WS? ',' WS? valueStmt; 568 | 569 | withStmt : 570 | WITH WS (implicitCallStmt_InStmt | (NEW WS type)) endOfStatement 571 | block? 572 | END_WITH 573 | ; 574 | 575 | writeStmt : WRITE WS fileNumber WS? ',' (WS? outputList)?; 576 | 577 | 578 | fileNumber : '#'? valueStmt; 579 | 580 | 581 | // complex call statements ---------------------------------- 582 | 583 | explicitCallStmt : 584 | eCS_ProcedureCall 585 | | eCS_MemberProcedureCall 586 | ; 587 | 588 | // parantheses are required in case of args -> empty parantheses are removed 589 | eCS_ProcedureCall : CALL WS ambiguousIdentifier typeHint? (WS? LPAREN WS? argsCall WS? RPAREN)? (WS? LPAREN subscripts RPAREN)*; 590 | 591 | 592 | 593 | // parantheses are required in case of args -> empty parantheses are removed 594 | eCS_MemberProcedureCall : CALL WS implicitCallStmt_InStmt? '.' ambiguousIdentifier typeHint? (WS? LPAREN WS? argsCall WS? RPAREN)? (WS? LPAREN subscripts RPAREN)*; 595 | 596 | 597 | implicitCallStmt_InBlock : 598 | iCS_B_MemberProcedureCall 599 | | iCS_B_ProcedureCall 600 | ; 601 | 602 | iCS_B_MemberProcedureCall : implicitCallStmt_InStmt? '.' ambiguousIdentifier typeHint? (WS argsCall)? dictionaryCallStmt? (WS? LPAREN subscripts RPAREN)*; 603 | 604 | // parantheses are forbidden in case of args 605 | // variables cannot be called in blocks 606 | // certainIdentifier instead of ambiguousIdentifier for preventing ambiguity with statement keywords 607 | iCS_B_ProcedureCall : certainIdentifier (WS argsCall)? (WS? LPAREN subscripts RPAREN)*; 608 | 609 | 610 | // iCS_S_MembersCall first, so that member calls are not resolved as separate iCS_S_VariableOrProcedureCalls 611 | implicitCallStmt_InStmt : 612 | iCS_S_MembersCall 613 | | iCS_S_VariableOrProcedureCall 614 | | iCS_S_ProcedureOrArrayCall 615 | | iCS_S_DictionaryCall 616 | ; 617 | 618 | iCS_S_VariableOrProcedureCall : ambiguousIdentifier typeHint? dictionaryCallStmt? (WS? LPAREN subscripts RPAREN)*; 619 | 620 | iCS_S_ProcedureOrArrayCall : (ambiguousIdentifier | baseType) typeHint? WS? LPAREN WS? (argsCall WS?)? RPAREN dictionaryCallStmt? (WS? LPAREN subscripts RPAREN)*; 621 | 622 | iCS_S_MembersCall : (iCS_S_VariableOrProcedureCall | iCS_S_ProcedureOrArrayCall)? iCS_S_MemberCall+ dictionaryCallStmt? (WS? LPAREN subscripts RPAREN)*; 623 | 624 | iCS_S_MemberCall : ('.' | '!') (iCS_S_VariableOrProcedureCall | iCS_S_ProcedureOrArrayCall); 625 | 626 | iCS_S_DictionaryCall : dictionaryCallStmt; 627 | 628 | 629 | // atomic call statements ---------------------------------- 630 | 631 | argsCall : (argCall? WS? (',' | ';') WS?)* argCall (WS? (',' | ';') WS? argCall?)*; 632 | 633 | argCall : LPAREN? ((BYVAL | BYREF | PARAMARRAY) WS)? RPAREN? valueStmt; 634 | 635 | dictionaryCallStmt : '!' ambiguousIdentifier typeHint?; 636 | 637 | 638 | // atomic rules for statements 639 | 640 | argList : LPAREN (WS? arg (WS? ',' WS? arg)*)? WS? RPAREN; 641 | 642 | arg : (OPTIONAL WS)? ((BYVAL | BYREF) WS)? (PARAMARRAY WS)? ambiguousIdentifier typeHint? (WS? LPAREN WS? RPAREN)? (WS? asTypeClause)? (WS? argDefaultValue)?; 643 | 644 | argDefaultValue : EQ WS? valueStmt; 645 | 646 | subscripts : subscript (WS? ',' WS? subscript)*; 647 | 648 | subscript : (valueStmt WS TO WS)? valueStmt; 649 | 650 | 651 | // atomic rules ---------------------------------- 652 | 653 | ambiguousIdentifier : 654 | (IDENTIFIER | ambiguousKeyword)+ 655 | ; 656 | 657 | asTypeClause : AS WS? (NEW WS)? type (WS? fieldLength)?; 658 | 659 | baseType : BOOLEAN | BYTE | COLLECTION | DATE | DOUBLE | INTEGER | LONG | SINGLE | STRING (WS? MULT WS? valueStmt)? | VARIANT; 660 | 661 | certainIdentifier : 662 | IDENTIFIER (ambiguousKeyword | IDENTIFIER)* 663 | | ambiguousKeyword (ambiguousKeyword | IDENTIFIER)+ 664 | ; 665 | 666 | comparisonOperator : LT | LEQ | GT | GEQ | EQ | NEQ | IS | LIKE; 667 | 668 | complexType : ambiguousIdentifier (('.' | '!') ambiguousIdentifier)*; 669 | 670 | fieldLength : MULT WS? (INTEGERLITERAL | ambiguousIdentifier); 671 | 672 | letterrange : certainIdentifier (WS? MINUS WS? certainIdentifier)?; 673 | 674 | lineLabel : ambiguousIdentifier ':'; 675 | 676 | literal : HEXLITERAL | OCTLITERAL | DATELITERAL | DOUBLELITERAL | INTEGERLITERAL | SHORTLITERAL | STRINGLITERAL | TRUE | FALSE | NOTHING | NULL; 677 | 678 | type : (baseType | complexType) (WS? LPAREN WS? RPAREN)?; 679 | 680 | typeHint : '&' | '%' | '#' | '!' | '@' | '$'; 681 | 682 | visibility : PRIVATE | PUBLIC | FRIEND | GLOBAL; 683 | 684 | // ambiguous keywords 685 | ambiguousKeyword : 686 | ACCESS | ADDRESSOF | ALIAS | AND | ATTRIBUTE | APPACTIVATE | APPEND | AS | 687 | BEEP | BEGIN | BINARY | BOOLEAN | BYVAL | BYREF | BYTE | 688 | CALL | CASE | CLASS | CLOSE | CHDIR | CHDRIVE | COLLECTION | CONST | 689 | DATABASE | DATE | DECLARE | DEFBOOL | DEFBYTE | DEFCUR | DEFDBL | DEFDATE | DEFDEC | DEFINT | DEFLNG | DEFOBJ | DEFSNG | DEFSTR | DEFVAR | DELETESETTING | DIM | DO | DOUBLE | 690 | EACH | ELSE | ELSEIF | END | ENUM | EQV | ERASE | ERROR | EVENT | 691 | FALSE | FILECOPY | FRIEND | FOR | FUNCTION | 692 | GET | GLOBAL | GOSUB | GOTO | 693 | IF | IMP | IMPLEMENTS | IN | INPUT | IS | INTEGER | 694 | KILL | 695 | LOAD | LOCK | LONG | LOOP | LEN | LET | LIB | LIKE | LSET | 696 | ME | MID | MKDIR | MOD | 697 | NAME | NEXT | NEW | NOT | NOTHING | NULL | 698 | ON | OPEN | OPTIONAL | OR | OUTPUT | 699 | PARAMARRAY | PRESERVE | PRINT | PRIVATE | PUBLIC | PUT | 700 | RANDOM | RANDOMIZE | RAISEEVENT | READ | REDIM | REM | RESET | RESUME | RETURN | RMDIR | RSET | 701 | SAVEPICTURE | SAVESETTING | SEEK | SELECT | SENDKEYS | SET | SETATTR | SHARED | SINGLE | SPC | STATIC | STEP | STOP | STRING | SUB | 702 | TAB | TEXT | THEN | TIME | TO | TRUE | TYPE | TYPEOF | 703 | UNLOAD | UNLOCK | UNTIL | 704 | VARIANT | VERSION | 705 | WEND | WHILE | WIDTH | WITH | WITHEVENTS | WRITE | 706 | XOR 707 | // added for the obfuscator 708 | | CHR | VAL 709 | ; 710 | 711 | remComment : REMCOMMENT; 712 | 713 | comment : COMMENT; 714 | 715 | endOfLine : WS? (NEWLINE | comment | remComment) WS?; 716 | 717 | endOfStatement : (endOfLine | WS? COLON WS?)*; 718 | 719 | 720 | // lexer rules -------------------------------------------------------------------------------- 721 | 722 | 723 | // keywords 724 | ACCESS : A C C E S S; 725 | ADDRESSOF : A D D R E S S O F; 726 | ALIAS : A L I A S; 727 | AND : A N D; 728 | ATTRIBUTE : A T T R I B U T E; 729 | APPACTIVATE : A P P A C T I V A T E; 730 | APPEND : A P P E N D; 731 | AS : A S; 732 | BEGIN : B E G I N; 733 | BEEP : B E E P; 734 | BINARY : B I N A R Y; 735 | BOOLEAN : B O O L E A N; 736 | BYVAL : B Y V A L; 737 | BYREF : B Y R E F; 738 | BYTE : B Y T E; 739 | CALL : C A L L; 740 | CASE : C A S E; 741 | CHDIR : C H D I R; 742 | CHDRIVE : C H D R I V E; 743 | CLASS : C L A S S; 744 | CLOSE : C L O S E; 745 | COLLECTION : C O L L E C T I O N; 746 | CONST : C O N S T; 747 | DATABASE : D A T A B A S E; 748 | DATE : D A T E; 749 | DECLARE : D E C L A R E; 750 | DEFBOOL : D E F B O O L; 751 | DEFBYTE : D E F B Y T E; 752 | DEFDATE : D E F D A T E; 753 | DEFDBL : D E F D B L; 754 | DEFDEC : D E F D E C; 755 | DEFCUR : D E F C U R; 756 | DEFINT : D E F I N T; 757 | DEFLNG : D E F L N G; 758 | DEFOBJ : D E F O B J; 759 | DEFSNG : D E F S N G; 760 | DEFSTR : D E F S T R; 761 | DEFVAR : D E F V A R; 762 | DELETESETTING : D E L E T E S E T T I N G; 763 | DIM : D I M; 764 | DO : D O; 765 | DOUBLE : D O U B L E; 766 | EACH : E A C H; 767 | ELSE : E L S E; 768 | ELSEIF : E L S E I F; 769 | END_ENUM : E N D WS E N U M; 770 | END_FUNCTION : E N D WS F U N C T I O N; 771 | END_IF : E N D WS I F; 772 | END_PROPERTY : E N D WS P R O P E R T Y; 773 | END_SELECT : E N D WS S E L E C T; 774 | END_SUB : E N D WS S U B; 775 | END_TYPE : E N D WS T Y P E; 776 | END_WITH : E N D WS W I T H; 777 | END : E N D; 778 | ENUM : E N U M; 779 | EQV : E Q V; 780 | ERASE : E R A S E; 781 | ERROR : E R R O R; 782 | EVENT : E V E N T; 783 | EXIT_DO : E X I T WS D O; 784 | EXIT_FOR : E X I T WS F O R; 785 | EXIT_FUNCTION : E X I T WS F U N C T I O N; 786 | EXIT_PROPERTY : E X I T WS P R O P E R T Y; 787 | EXIT_SUB : E X I T WS S U B; 788 | FALSE : F A L S E; 789 | FILECOPY : F I L E C O P Y; 790 | FRIEND : F R I E N D; 791 | FOR : F O R; 792 | FUNCTION : F U N C T I O N; 793 | GET : G E T; 794 | GLOBAL : G L O B A L; 795 | GOSUB : G O S U B; 796 | GOTO : G O T O; 797 | IF : I F; 798 | IMP : I M P; 799 | IMPLEMENTS : I M P L E M E N T S; 800 | IN : I N; 801 | INPUT : I N P U T; 802 | IS : I S; 803 | INTEGER : I N T E G E R; 804 | KILL: K I L L; 805 | LOAD : L O A D; 806 | LOCK : L O C K; 807 | LONG : L O N G; 808 | LOOP : L O O P; 809 | LEN : L E N; 810 | LET : L E T; 811 | LIB : L I B; 812 | LIKE : L I K E; 813 | LINE_INPUT : L I N E WS I N P U T; 814 | LOCK_READ : L O C K WS R E A D; 815 | LOCK_WRITE : L O C K WS W R I T E; 816 | LOCK_READ_WRITE : L O C K WS R E A D WS W R I T E; 817 | LSET : L S E T; 818 | MACRO_CONST : '#' C O N S T; 819 | MACRO_IF : '#' I F; 820 | MACRO_ELSEIF : '#' E L S E I F; 821 | MACRO_ELSE : '#' E L S E; 822 | MACRO_END_IF : '#' E N D WS? I F; 823 | ME : M E; 824 | MID : M I D; 825 | MKDIR : M K D I R; 826 | MOD : M O D; 827 | NAME : N A M E; 828 | NEXT : N E X T; 829 | NEW : N E W; 830 | NOT : N O T; 831 | NOTHING : N O T H I N G; 832 | NULL : N U L L; 833 | ON : O N; 834 | ON_ERROR : O N WS E R R O R; 835 | ON_LOCAL_ERROR : O N WS L O C A L WS E R R O R; 836 | OPEN : O P E N; 837 | OPTIONAL : O P T I O N A L; 838 | OPTION_BASE : O P T I O N WS B A S E; 839 | OPTION_EXPLICIT : O P T I O N WS E X P L I C I T; 840 | OPTION_COMPARE : O P T I O N WS C O M P A R E; 841 | OPTION_PRIVATE_MODULE : O P T I O N WS P R I V A T E WS M O D U L E; 842 | OR : O R; 843 | OUTPUT : O U T P U T; 844 | PARAMARRAY : P A R A M A R R A Y; 845 | PRESERVE : P R E S E R V E; 846 | PRINT : P R I N T; 847 | PRIVATE : P R I V A T E; 848 | PROPERTY_GET : P R O P E R T Y WS G E T; 849 | PROPERTY_LET : P R O P E R T Y WS L E T; 850 | PROPERTY_SET : P R O P E R T Y WS S E T; 851 | PTRSAFE : P T R S A F E; 852 | PUBLIC : P U B L I C; 853 | PUT : P U T; 854 | RANDOM : R A N D O M; 855 | RANDOMIZE : R A N D O M I Z E; 856 | RAISEEVENT : R A I S E E V E N T; 857 | READ : R E A D; 858 | READ_WRITE : R E A D WS W R I T E; 859 | REDIM : R E D I M; 860 | REM : R E M; 861 | RESET : R E S E T; 862 | RESUME : R E S U M E; 863 | RETURN : R E T U R N; 864 | RMDIR : R M D I R; 865 | RSET : R S E T; 866 | SAVEPICTURE : S A V E P I C T U R E; 867 | SAVESETTING : S A V E S E T T I N G; 868 | SEEK : S E E K; 869 | SELECT : S E L E C T; 870 | SENDKEYS : S E N D K E Y S; 871 | SET : S E T; 872 | SETATTR : S E T A T T R; 873 | SHARED : S H A R E D; 874 | SINGLE : S I N G L E; 875 | SPC : S P C; 876 | STATIC : S T A T I C; 877 | STEP : S T E P; 878 | STOP : S T O P; 879 | STRING : S T R I N G; 880 | SUB : S U B; 881 | TAB : T A B; 882 | TEXT : T E X T; 883 | THEN : T H E N; 884 | TIME : T I M E; 885 | TO : T O; 886 | TRUE : T R U E; 887 | TYPE : T Y P E; 888 | TYPEOF : T Y P E O F; 889 | UNLOAD : U N L O A D; 890 | UNLOCK : U N L O C K; 891 | UNTIL : U N T I L; 892 | VARIANT : V A R I A N T; 893 | VERSION : V E R S I O N; 894 | WEND : W E N D; 895 | WHILE : W H I L E; 896 | WIDTH : W I D T H; 897 | WITH : W I T H; 898 | WITHEVENTS : W I T H E V E N T S; 899 | WRITE : W R I T E; 900 | XOR : X O R; 901 | // added for the obfuscator 902 | CHR : C H R; 903 | VAL : V A L; 904 | 905 | 906 | // symbols 907 | AMPERSAND : '&'; 908 | ASSIGN : ':='; 909 | DIV : '\\' | '/'; 910 | EQ : '='; 911 | GEQ : '>='; 912 | GT : '>'; 913 | LEQ : '<='; 914 | LPAREN : '('; 915 | LT : '<'; 916 | MINUS : '-'; 917 | MINUS_EQ : '-='; 918 | MULT : '*'; 919 | NEQ : '<>'; 920 | PLUS : '+'; 921 | PLUS_EQ : '+='; 922 | POW : '^'; 923 | RPAREN : ')'; 924 | L_SQUARE_BRACKET : '['; 925 | R_SQUARE_BRACKET : ']'; 926 | 927 | 928 | // literals 929 | STRINGLITERAL : '"' (~["\r\n] | '""')* '"'; 930 | OCTLITERAL : '&O' [0-7]+ '&'?; 931 | HEXLITERAL : '&H' [0-9A-F]+ '&'?; 932 | SHORTLITERAL : (PLUS|MINUS)? DIGIT+ ('#' | '&' | '@')?; 933 | INTEGERLITERAL : SHORTLITERAL (E SHORTLITERAL)?; 934 | DOUBLELITERAL : (PLUS|MINUS)? DIGIT* '.' DIGIT+ (E SHORTLITERAL)?; 935 | DATELITERAL : '#' DATEORTIME '#'; 936 | fragment DATEORTIME : DATEVALUE WS? TIMEVALUE | DATEVALUE | TIMEVALUE; 937 | fragment DATEVALUE : DATEVALUEPART DATESEPARATOR DATEVALUEPART (DATESEPARATOR DATEVALUEPART)?; 938 | fragment DATEVALUEPART : DIGIT+ | MONTHNAME; 939 | fragment DATESEPARATOR : WS? [/,-]? WS?; 940 | fragment MONTHNAME : ENGLISHMONTHNAME | ENGLISHMONTHABBREVIATION; 941 | fragment ENGLISHMONTHNAME : J A N U A R Y | F E B R U A R Y | M A R C H | A P R I L | M A Y | J U N E | A U G U S T | S E P T E M B E R | O C T O B E R | N O V E M B E R | D E C E M B E R; 942 | fragment ENGLISHMONTHABBREVIATION : J A N | F E B | M A R | A P R | J U N | J U L | A U G | S E P | O C T | N O V | D E C; 943 | fragment TIMEVALUE : DIGIT+ AMPM | DIGIT+ TIMESEPARATOR DIGIT+ (TIMESEPARATOR DIGIT+)? AMPM?; 944 | fragment TIMESEPARATOR : WS? (':' | '.') WS?; 945 | fragment AMPM : WS? (A M | P M | A | P); 946 | 947 | // whitespace, line breaks, comments, ... 948 | LINE_CONTINUATION : [ \t]+ UNDERSCORE '\r'? '\n' -> skip; 949 | NEWLINE : [\r\n\u2028\u2029]+; 950 | REMCOMMENT : COLON? REM WS (LINE_CONTINUATION | ~[\r\n\u2028\u2029])*; 951 | COMMENT : SINGLEQUOTE (LINE_CONTINUATION | ~[\r\n\u2028\u2029])*; 952 | SINGLEQUOTE : '\''; 953 | COLON : ':'; 954 | UNDERSCORE : '_'; 955 | WS : ([ \t] | LINE_CONTINUATION)+; 956 | 957 | // identifier 958 | IDENTIFIER : ~[\]()\r\n\t.,'"|!@#$%^&*\-+:=; ]+ | L_SQUARE_BRACKET (~[!\]\r\n])+ R_SQUARE_BRACKET; 959 | 960 | // letters 961 | fragment LETTER : [a-zA-Z_\p{L}]; 962 | fragment DIGIT : [0-9]; 963 | fragment LETTERORDIGIT : [a-zA-Z0-9_\p{L}]; 964 | 965 | // case insensitive chars 966 | fragment A:[aA]; 967 | fragment B:[bB]; 968 | fragment C:[cC]; 969 | fragment D:[dD]; 970 | fragment E:[eE]; 971 | fragment F:[fF]; 972 | fragment G:[gG]; 973 | fragment H:[hH]; 974 | fragment I:[iI]; 975 | fragment J:[jJ]; 976 | fragment K:[kK]; 977 | fragment L:[lL]; 978 | fragment M:[mM]; 979 | fragment N:[nN]; 980 | fragment O:[oO]; 981 | fragment P:[pP]; 982 | fragment Q:[qQ]; 983 | fragment R:[rR]; 984 | fragment S:[sS]; 985 | fragment T:[tT]; 986 | fragment U:[uU]; 987 | fragment V:[vV]; 988 | fragment W:[wW]; 989 | fragment X:[xX]; 990 | fragment Y:[yY]; 991 | fragment Z:[zZ]; -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /src/VBAObfuscator/parser/vbaVisitor.java: -------------------------------------------------------------------------------- 1 | // Generated from C:/dev/VBAObfuscator/src/VBAObfuscator/parser\vba.g4 by ANTLR 4.8 2 | package VBAObfuscator.parser; 3 | import org.antlr.v4.runtime.tree.ParseTreeVisitor; 4 | 5 | /** 6 | * This interface defines a complete generic visitor for a parse tree produced 7 | * by {@link vbaParser}. 8 | * 9 | * @param The return type of the visit operation. Use {@link Void} for 10 | * operations with no return type. 11 | */ 12 | public interface vbaVisitor extends ParseTreeVisitor { 13 | /** 14 | * Visit a parse tree produced by {@link vbaParser#startRule}. 15 | * @param ctx the parse tree 16 | * @return the visitor result 17 | */ 18 | T visitStartRule(vbaParser.StartRuleContext ctx); 19 | /** 20 | * Visit a parse tree produced by {@link vbaParser#module}. 21 | * @param ctx the parse tree 22 | * @return the visitor result 23 | */ 24 | T visitModule(vbaParser.ModuleContext ctx); 25 | /** 26 | * Visit a parse tree produced by {@link vbaParser#moduleHeader}. 27 | * @param ctx the parse tree 28 | * @return the visitor result 29 | */ 30 | T visitModuleHeader(vbaParser.ModuleHeaderContext ctx); 31 | /** 32 | * Visit a parse tree produced by {@link vbaParser#moduleConfig}. 33 | * @param ctx the parse tree 34 | * @return the visitor result 35 | */ 36 | T visitModuleConfig(vbaParser.ModuleConfigContext ctx); 37 | /** 38 | * Visit a parse tree produced by {@link vbaParser#moduleConfigElement}. 39 | * @param ctx the parse tree 40 | * @return the visitor result 41 | */ 42 | T visitModuleConfigElement(vbaParser.ModuleConfigElementContext ctx); 43 | /** 44 | * Visit a parse tree produced by {@link vbaParser#moduleAttributes}. 45 | * @param ctx the parse tree 46 | * @return the visitor result 47 | */ 48 | T visitModuleAttributes(vbaParser.ModuleAttributesContext ctx); 49 | /** 50 | * Visit a parse tree produced by {@link vbaParser#moduleDeclarations}. 51 | * @param ctx the parse tree 52 | * @return the visitor result 53 | */ 54 | T visitModuleDeclarations(vbaParser.ModuleDeclarationsContext ctx); 55 | /** 56 | * Visit a parse tree produced by the {@code optionBaseStmt} 57 | * labeled alternative in {@link vbaParser#moduleOption}. 58 | * @param ctx the parse tree 59 | * @return the visitor result 60 | */ 61 | T visitOptionBaseStmt(vbaParser.OptionBaseStmtContext ctx); 62 | /** 63 | * Visit a parse tree produced by the {@code optionCompareStmt} 64 | * labeled alternative in {@link vbaParser#moduleOption}. 65 | * @param ctx the parse tree 66 | * @return the visitor result 67 | */ 68 | T visitOptionCompareStmt(vbaParser.OptionCompareStmtContext ctx); 69 | /** 70 | * Visit a parse tree produced by the {@code optionExplicitStmt} 71 | * labeled alternative in {@link vbaParser#moduleOption}. 72 | * @param ctx the parse tree 73 | * @return the visitor result 74 | */ 75 | T visitOptionExplicitStmt(vbaParser.OptionExplicitStmtContext ctx); 76 | /** 77 | * Visit a parse tree produced by the {@code optionPrivateModuleStmt} 78 | * labeled alternative in {@link vbaParser#moduleOption}. 79 | * @param ctx the parse tree 80 | * @return the visitor result 81 | */ 82 | T visitOptionPrivateModuleStmt(vbaParser.OptionPrivateModuleStmtContext ctx); 83 | /** 84 | * Visit a parse tree produced by {@link vbaParser#moduleDeclarationsElement}. 85 | * @param ctx the parse tree 86 | * @return the visitor result 87 | */ 88 | T visitModuleDeclarationsElement(vbaParser.ModuleDeclarationsElementContext ctx); 89 | /** 90 | * Visit a parse tree produced by {@link vbaParser#macroStmt}. 91 | * @param ctx the parse tree 92 | * @return the visitor result 93 | */ 94 | T visitMacroStmt(vbaParser.MacroStmtContext ctx); 95 | /** 96 | * Visit a parse tree produced by {@link vbaParser#moduleBody}. 97 | * @param ctx the parse tree 98 | * @return the visitor result 99 | */ 100 | T visitModuleBody(vbaParser.ModuleBodyContext ctx); 101 | /** 102 | * Visit a parse tree produced by {@link vbaParser#moduleBodyElement}. 103 | * @param ctx the parse tree 104 | * @return the visitor result 105 | */ 106 | T visitModuleBodyElement(vbaParser.ModuleBodyElementContext ctx); 107 | /** 108 | * Visit a parse tree produced by {@link vbaParser#attributeStmt}. 109 | * @param ctx the parse tree 110 | * @return the visitor result 111 | */ 112 | T visitAttributeStmt(vbaParser.AttributeStmtContext ctx); 113 | /** 114 | * Visit a parse tree produced by {@link vbaParser#block}. 115 | * @param ctx the parse tree 116 | * @return the visitor result 117 | */ 118 | T visitBlock(vbaParser.BlockContext ctx); 119 | /** 120 | * Visit a parse tree produced by {@link vbaParser#blockStmt}. 121 | * @param ctx the parse tree 122 | * @return the visitor result 123 | */ 124 | T visitBlockStmt(vbaParser.BlockStmtContext ctx); 125 | /** 126 | * Visit a parse tree produced by {@link vbaParser#appactivateStmt}. 127 | * @param ctx the parse tree 128 | * @return the visitor result 129 | */ 130 | T visitAppactivateStmt(vbaParser.AppactivateStmtContext ctx); 131 | /** 132 | * Visit a parse tree produced by {@link vbaParser#beepStmt}. 133 | * @param ctx the parse tree 134 | * @return the visitor result 135 | */ 136 | T visitBeepStmt(vbaParser.BeepStmtContext ctx); 137 | /** 138 | * Visit a parse tree produced by {@link vbaParser#chdirStmt}. 139 | * @param ctx the parse tree 140 | * @return the visitor result 141 | */ 142 | T visitChdirStmt(vbaParser.ChdirStmtContext ctx); 143 | /** 144 | * Visit a parse tree produced by {@link vbaParser#chdriveStmt}. 145 | * @param ctx the parse tree 146 | * @return the visitor result 147 | */ 148 | T visitChdriveStmt(vbaParser.ChdriveStmtContext ctx); 149 | /** 150 | * Visit a parse tree produced by {@link vbaParser#closeStmt}. 151 | * @param ctx the parse tree 152 | * @return the visitor result 153 | */ 154 | T visitCloseStmt(vbaParser.CloseStmtContext ctx); 155 | /** 156 | * Visit a parse tree produced by {@link vbaParser#constStmt}. 157 | * @param ctx the parse tree 158 | * @return the visitor result 159 | */ 160 | T visitConstStmt(vbaParser.ConstStmtContext ctx); 161 | /** 162 | * Visit a parse tree produced by {@link vbaParser#constSubStmt}. 163 | * @param ctx the parse tree 164 | * @return the visitor result 165 | */ 166 | T visitConstSubStmt(vbaParser.ConstSubStmtContext ctx); 167 | /** 168 | * Visit a parse tree produced by {@link vbaParser#dateStmt}. 169 | * @param ctx the parse tree 170 | * @return the visitor result 171 | */ 172 | T visitDateStmt(vbaParser.DateStmtContext ctx); 173 | /** 174 | * Visit a parse tree produced by {@link vbaParser#declareStmt}. 175 | * @param ctx the parse tree 176 | * @return the visitor result 177 | */ 178 | T visitDeclareStmt(vbaParser.DeclareStmtContext ctx); 179 | /** 180 | * Visit a parse tree produced by {@link vbaParser#deftypeStmt}. 181 | * @param ctx the parse tree 182 | * @return the visitor result 183 | */ 184 | T visitDeftypeStmt(vbaParser.DeftypeStmtContext ctx); 185 | /** 186 | * Visit a parse tree produced by {@link vbaParser#deleteSettingStmt}. 187 | * @param ctx the parse tree 188 | * @return the visitor result 189 | */ 190 | T visitDeleteSettingStmt(vbaParser.DeleteSettingStmtContext ctx); 191 | /** 192 | * Visit a parse tree produced by {@link vbaParser#doLoopStmt}. 193 | * @param ctx the parse tree 194 | * @return the visitor result 195 | */ 196 | T visitDoLoopStmt(vbaParser.DoLoopStmtContext ctx); 197 | /** 198 | * Visit a parse tree produced by {@link vbaParser#endStmt}. 199 | * @param ctx the parse tree 200 | * @return the visitor result 201 | */ 202 | T visitEndStmt(vbaParser.EndStmtContext ctx); 203 | /** 204 | * Visit a parse tree produced by {@link vbaParser#enumerationStmt}. 205 | * @param ctx the parse tree 206 | * @return the visitor result 207 | */ 208 | T visitEnumerationStmt(vbaParser.EnumerationStmtContext ctx); 209 | /** 210 | * Visit a parse tree produced by {@link vbaParser#enumerationStmt_Constant}. 211 | * @param ctx the parse tree 212 | * @return the visitor result 213 | */ 214 | T visitEnumerationStmt_Constant(vbaParser.EnumerationStmt_ConstantContext ctx); 215 | /** 216 | * Visit a parse tree produced by {@link vbaParser#eraseStmt}. 217 | * @param ctx the parse tree 218 | * @return the visitor result 219 | */ 220 | T visitEraseStmt(vbaParser.EraseStmtContext ctx); 221 | /** 222 | * Visit a parse tree produced by {@link vbaParser#errorStmt}. 223 | * @param ctx the parse tree 224 | * @return the visitor result 225 | */ 226 | T visitErrorStmt(vbaParser.ErrorStmtContext ctx); 227 | /** 228 | * Visit a parse tree produced by {@link vbaParser#eventStmt}. 229 | * @param ctx the parse tree 230 | * @return the visitor result 231 | */ 232 | T visitEventStmt(vbaParser.EventStmtContext ctx); 233 | /** 234 | * Visit a parse tree produced by {@link vbaParser#exitStmt}. 235 | * @param ctx the parse tree 236 | * @return the visitor result 237 | */ 238 | T visitExitStmt(vbaParser.ExitStmtContext ctx); 239 | /** 240 | * Visit a parse tree produced by {@link vbaParser#filecopyStmt}. 241 | * @param ctx the parse tree 242 | * @return the visitor result 243 | */ 244 | T visitFilecopyStmt(vbaParser.FilecopyStmtContext ctx); 245 | /** 246 | * Visit a parse tree produced by {@link vbaParser#forEachStmt}. 247 | * @param ctx the parse tree 248 | * @return the visitor result 249 | */ 250 | T visitForEachStmt(vbaParser.ForEachStmtContext ctx); 251 | /** 252 | * Visit a parse tree produced by {@link vbaParser#forNextStmt}. 253 | * @param ctx the parse tree 254 | * @return the visitor result 255 | */ 256 | T visitForNextStmt(vbaParser.ForNextStmtContext ctx); 257 | /** 258 | * Visit a parse tree produced by {@link vbaParser#functionStmt}. 259 | * @param ctx the parse tree 260 | * @return the visitor result 261 | */ 262 | T visitFunctionStmt(vbaParser.FunctionStmtContext ctx); 263 | /** 264 | * Visit a parse tree produced by {@link vbaParser#getStmt}. 265 | * @param ctx the parse tree 266 | * @return the visitor result 267 | */ 268 | T visitGetStmt(vbaParser.GetStmtContext ctx); 269 | /** 270 | * Visit a parse tree produced by {@link vbaParser#goSubStmt}. 271 | * @param ctx the parse tree 272 | * @return the visitor result 273 | */ 274 | T visitGoSubStmt(vbaParser.GoSubStmtContext ctx); 275 | /** 276 | * Visit a parse tree produced by {@link vbaParser#goToStmt}. 277 | * @param ctx the parse tree 278 | * @return the visitor result 279 | */ 280 | T visitGoToStmt(vbaParser.GoToStmtContext ctx); 281 | /** 282 | * Visit a parse tree produced by the {@code inlineIfThenElse} 283 | * labeled alternative in {@link vbaParser#ifThenElseStmt}. 284 | * @param ctx the parse tree 285 | * @return the visitor result 286 | */ 287 | T visitInlineIfThenElse(vbaParser.InlineIfThenElseContext ctx); 288 | /** 289 | * Visit a parse tree produced by the {@code blockIfThenElse} 290 | * labeled alternative in {@link vbaParser#ifThenElseStmt}. 291 | * @param ctx the parse tree 292 | * @return the visitor result 293 | */ 294 | T visitBlockIfThenElse(vbaParser.BlockIfThenElseContext ctx); 295 | /** 296 | * Visit a parse tree produced by {@link vbaParser#ifBlockStmt}. 297 | * @param ctx the parse tree 298 | * @return the visitor result 299 | */ 300 | T visitIfBlockStmt(vbaParser.IfBlockStmtContext ctx); 301 | /** 302 | * Visit a parse tree produced by {@link vbaParser#ifConditionStmt}. 303 | * @param ctx the parse tree 304 | * @return the visitor result 305 | */ 306 | T visitIfConditionStmt(vbaParser.IfConditionStmtContext ctx); 307 | /** 308 | * Visit a parse tree produced by {@link vbaParser#ifElseIfBlockStmt}. 309 | * @param ctx the parse tree 310 | * @return the visitor result 311 | */ 312 | T visitIfElseIfBlockStmt(vbaParser.IfElseIfBlockStmtContext ctx); 313 | /** 314 | * Visit a parse tree produced by {@link vbaParser#ifElseBlockStmt}. 315 | * @param ctx the parse tree 316 | * @return the visitor result 317 | */ 318 | T visitIfElseBlockStmt(vbaParser.IfElseBlockStmtContext ctx); 319 | /** 320 | * Visit a parse tree produced by {@link vbaParser#implementsStmt}. 321 | * @param ctx the parse tree 322 | * @return the visitor result 323 | */ 324 | T visitImplementsStmt(vbaParser.ImplementsStmtContext ctx); 325 | /** 326 | * Visit a parse tree produced by {@link vbaParser#inputStmt}. 327 | * @param ctx the parse tree 328 | * @return the visitor result 329 | */ 330 | T visitInputStmt(vbaParser.InputStmtContext ctx); 331 | /** 332 | * Visit a parse tree produced by {@link vbaParser#killStmt}. 333 | * @param ctx the parse tree 334 | * @return the visitor result 335 | */ 336 | T visitKillStmt(vbaParser.KillStmtContext ctx); 337 | /** 338 | * Visit a parse tree produced by {@link vbaParser#letStmt}. 339 | * @param ctx the parse tree 340 | * @return the visitor result 341 | */ 342 | T visitLetStmt(vbaParser.LetStmtContext ctx); 343 | /** 344 | * Visit a parse tree produced by {@link vbaParser#lineInputStmt}. 345 | * @param ctx the parse tree 346 | * @return the visitor result 347 | */ 348 | T visitLineInputStmt(vbaParser.LineInputStmtContext ctx); 349 | /** 350 | * Visit a parse tree produced by {@link vbaParser#loadStmt}. 351 | * @param ctx the parse tree 352 | * @return the visitor result 353 | */ 354 | T visitLoadStmt(vbaParser.LoadStmtContext ctx); 355 | /** 356 | * Visit a parse tree produced by {@link vbaParser#lockStmt}. 357 | * @param ctx the parse tree 358 | * @return the visitor result 359 | */ 360 | T visitLockStmt(vbaParser.LockStmtContext ctx); 361 | /** 362 | * Visit a parse tree produced by {@link vbaParser#lsetStmt}. 363 | * @param ctx the parse tree 364 | * @return the visitor result 365 | */ 366 | T visitLsetStmt(vbaParser.LsetStmtContext ctx); 367 | /** 368 | * Visit a parse tree produced by {@link vbaParser#macroConstStmt}. 369 | * @param ctx the parse tree 370 | * @return the visitor result 371 | */ 372 | T visitMacroConstStmt(vbaParser.MacroConstStmtContext ctx); 373 | /** 374 | * Visit a parse tree produced by {@link vbaParser#macroIfThenElseStmt}. 375 | * @param ctx the parse tree 376 | * @return the visitor result 377 | */ 378 | T visitMacroIfThenElseStmt(vbaParser.MacroIfThenElseStmtContext ctx); 379 | /** 380 | * Visit a parse tree produced by {@link vbaParser#macroIfBlockStmt}. 381 | * @param ctx the parse tree 382 | * @return the visitor result 383 | */ 384 | T visitMacroIfBlockStmt(vbaParser.MacroIfBlockStmtContext ctx); 385 | /** 386 | * Visit a parse tree produced by {@link vbaParser#macroElseIfBlockStmt}. 387 | * @param ctx the parse tree 388 | * @return the visitor result 389 | */ 390 | T visitMacroElseIfBlockStmt(vbaParser.MacroElseIfBlockStmtContext ctx); 391 | /** 392 | * Visit a parse tree produced by {@link vbaParser#macroElseBlockStmt}. 393 | * @param ctx the parse tree 394 | * @return the visitor result 395 | */ 396 | T visitMacroElseBlockStmt(vbaParser.MacroElseBlockStmtContext ctx); 397 | /** 398 | * Visit a parse tree produced by {@link vbaParser#midStmt}. 399 | * @param ctx the parse tree 400 | * @return the visitor result 401 | */ 402 | T visitMidStmt(vbaParser.MidStmtContext ctx); 403 | /** 404 | * Visit a parse tree produced by {@link vbaParser#mkdirStmt}. 405 | * @param ctx the parse tree 406 | * @return the visitor result 407 | */ 408 | T visitMkdirStmt(vbaParser.MkdirStmtContext ctx); 409 | /** 410 | * Visit a parse tree produced by {@link vbaParser#nameStmt}. 411 | * @param ctx the parse tree 412 | * @return the visitor result 413 | */ 414 | T visitNameStmt(vbaParser.NameStmtContext ctx); 415 | /** 416 | * Visit a parse tree produced by {@link vbaParser#onErrorStmt}. 417 | * @param ctx the parse tree 418 | * @return the visitor result 419 | */ 420 | T visitOnErrorStmt(vbaParser.OnErrorStmtContext ctx); 421 | /** 422 | * Visit a parse tree produced by {@link vbaParser#onGoToStmt}. 423 | * @param ctx the parse tree 424 | * @return the visitor result 425 | */ 426 | T visitOnGoToStmt(vbaParser.OnGoToStmtContext ctx); 427 | /** 428 | * Visit a parse tree produced by {@link vbaParser#onGoSubStmt}. 429 | * @param ctx the parse tree 430 | * @return the visitor result 431 | */ 432 | T visitOnGoSubStmt(vbaParser.OnGoSubStmtContext ctx); 433 | /** 434 | * Visit a parse tree produced by {@link vbaParser#openStmt}. 435 | * @param ctx the parse tree 436 | * @return the visitor result 437 | */ 438 | T visitOpenStmt(vbaParser.OpenStmtContext ctx); 439 | /** 440 | * Visit a parse tree produced by {@link vbaParser#outputList}. 441 | * @param ctx the parse tree 442 | * @return the visitor result 443 | */ 444 | T visitOutputList(vbaParser.OutputListContext ctx); 445 | /** 446 | * Visit a parse tree produced by {@link vbaParser#outputList_Expression}. 447 | * @param ctx the parse tree 448 | * @return the visitor result 449 | */ 450 | T visitOutputList_Expression(vbaParser.OutputList_ExpressionContext ctx); 451 | /** 452 | * Visit a parse tree produced by {@link vbaParser#printStmt}. 453 | * @param ctx the parse tree 454 | * @return the visitor result 455 | */ 456 | T visitPrintStmt(vbaParser.PrintStmtContext ctx); 457 | /** 458 | * Visit a parse tree produced by {@link vbaParser#propertyGetStmt}. 459 | * @param ctx the parse tree 460 | * @return the visitor result 461 | */ 462 | T visitPropertyGetStmt(vbaParser.PropertyGetStmtContext ctx); 463 | /** 464 | * Visit a parse tree produced by {@link vbaParser#propertySetStmt}. 465 | * @param ctx the parse tree 466 | * @return the visitor result 467 | */ 468 | T visitPropertySetStmt(vbaParser.PropertySetStmtContext ctx); 469 | /** 470 | * Visit a parse tree produced by {@link vbaParser#propertyLetStmt}. 471 | * @param ctx the parse tree 472 | * @return the visitor result 473 | */ 474 | T visitPropertyLetStmt(vbaParser.PropertyLetStmtContext ctx); 475 | /** 476 | * Visit a parse tree produced by {@link vbaParser#putStmt}. 477 | * @param ctx the parse tree 478 | * @return the visitor result 479 | */ 480 | T visitPutStmt(vbaParser.PutStmtContext ctx); 481 | /** 482 | * Visit a parse tree produced by {@link vbaParser#raiseEventStmt}. 483 | * @param ctx the parse tree 484 | * @return the visitor result 485 | */ 486 | T visitRaiseEventStmt(vbaParser.RaiseEventStmtContext ctx); 487 | /** 488 | * Visit a parse tree produced by {@link vbaParser#randomizeStmt}. 489 | * @param ctx the parse tree 490 | * @return the visitor result 491 | */ 492 | T visitRandomizeStmt(vbaParser.RandomizeStmtContext ctx); 493 | /** 494 | * Visit a parse tree produced by {@link vbaParser#redimStmt}. 495 | * @param ctx the parse tree 496 | * @return the visitor result 497 | */ 498 | T visitRedimStmt(vbaParser.RedimStmtContext ctx); 499 | /** 500 | * Visit a parse tree produced by {@link vbaParser#redimSubStmt}. 501 | * @param ctx the parse tree 502 | * @return the visitor result 503 | */ 504 | T visitRedimSubStmt(vbaParser.RedimSubStmtContext ctx); 505 | /** 506 | * Visit a parse tree produced by {@link vbaParser#resetStmt}. 507 | * @param ctx the parse tree 508 | * @return the visitor result 509 | */ 510 | T visitResetStmt(vbaParser.ResetStmtContext ctx); 511 | /** 512 | * Visit a parse tree produced by {@link vbaParser#resumeStmt}. 513 | * @param ctx the parse tree 514 | * @return the visitor result 515 | */ 516 | T visitResumeStmt(vbaParser.ResumeStmtContext ctx); 517 | /** 518 | * Visit a parse tree produced by {@link vbaParser#returnStmt}. 519 | * @param ctx the parse tree 520 | * @return the visitor result 521 | */ 522 | T visitReturnStmt(vbaParser.ReturnStmtContext ctx); 523 | /** 524 | * Visit a parse tree produced by {@link vbaParser#rmdirStmt}. 525 | * @param ctx the parse tree 526 | * @return the visitor result 527 | */ 528 | T visitRmdirStmt(vbaParser.RmdirStmtContext ctx); 529 | /** 530 | * Visit a parse tree produced by {@link vbaParser#rsetStmt}. 531 | * @param ctx the parse tree 532 | * @return the visitor result 533 | */ 534 | T visitRsetStmt(vbaParser.RsetStmtContext ctx); 535 | /** 536 | * Visit a parse tree produced by {@link vbaParser#savepictureStmt}. 537 | * @param ctx the parse tree 538 | * @return the visitor result 539 | */ 540 | T visitSavepictureStmt(vbaParser.SavepictureStmtContext ctx); 541 | /** 542 | * Visit a parse tree produced by {@link vbaParser#saveSettingStmt}. 543 | * @param ctx the parse tree 544 | * @return the visitor result 545 | */ 546 | T visitSaveSettingStmt(vbaParser.SaveSettingStmtContext ctx); 547 | /** 548 | * Visit a parse tree produced by {@link vbaParser#seekStmt}. 549 | * @param ctx the parse tree 550 | * @return the visitor result 551 | */ 552 | T visitSeekStmt(vbaParser.SeekStmtContext ctx); 553 | /** 554 | * Visit a parse tree produced by {@link vbaParser#selectCaseStmt}. 555 | * @param ctx the parse tree 556 | * @return the visitor result 557 | */ 558 | T visitSelectCaseStmt(vbaParser.SelectCaseStmtContext ctx); 559 | /** 560 | * Visit a parse tree produced by the {@code caseCondIs} 561 | * labeled alternative in {@link vbaParser#sC_Selection}. 562 | * @param ctx the parse tree 563 | * @return the visitor result 564 | */ 565 | T visitCaseCondIs(vbaParser.CaseCondIsContext ctx); 566 | /** 567 | * Visit a parse tree produced by the {@code caseCondTo} 568 | * labeled alternative in {@link vbaParser#sC_Selection}. 569 | * @param ctx the parse tree 570 | * @return the visitor result 571 | */ 572 | T visitCaseCondTo(vbaParser.CaseCondToContext ctx); 573 | /** 574 | * Visit a parse tree produced by the {@code caseCondValue} 575 | * labeled alternative in {@link vbaParser#sC_Selection}. 576 | * @param ctx the parse tree 577 | * @return the visitor result 578 | */ 579 | T visitCaseCondValue(vbaParser.CaseCondValueContext ctx); 580 | /** 581 | * Visit a parse tree produced by {@link vbaParser#sC_Case}. 582 | * @param ctx the parse tree 583 | * @return the visitor result 584 | */ 585 | T visitSC_Case(vbaParser.SC_CaseContext ctx); 586 | /** 587 | * Visit a parse tree produced by the {@code caseCondElse} 588 | * labeled alternative in {@link vbaParser#sC_Cond}. 589 | * @param ctx the parse tree 590 | * @return the visitor result 591 | */ 592 | T visitCaseCondElse(vbaParser.CaseCondElseContext ctx); 593 | /** 594 | * Visit a parse tree produced by the {@code caseCondSelection} 595 | * labeled alternative in {@link vbaParser#sC_Cond}. 596 | * @param ctx the parse tree 597 | * @return the visitor result 598 | */ 599 | T visitCaseCondSelection(vbaParser.CaseCondSelectionContext ctx); 600 | /** 601 | * Visit a parse tree produced by {@link vbaParser#sendkeysStmt}. 602 | * @param ctx the parse tree 603 | * @return the visitor result 604 | */ 605 | T visitSendkeysStmt(vbaParser.SendkeysStmtContext ctx); 606 | /** 607 | * Visit a parse tree produced by {@link vbaParser#setattrStmt}. 608 | * @param ctx the parse tree 609 | * @return the visitor result 610 | */ 611 | T visitSetattrStmt(vbaParser.SetattrStmtContext ctx); 612 | /** 613 | * Visit a parse tree produced by {@link vbaParser#setStmt}. 614 | * @param ctx the parse tree 615 | * @return the visitor result 616 | */ 617 | T visitSetStmt(vbaParser.SetStmtContext ctx); 618 | /** 619 | * Visit a parse tree produced by {@link vbaParser#stopStmt}. 620 | * @param ctx the parse tree 621 | * @return the visitor result 622 | */ 623 | T visitStopStmt(vbaParser.StopStmtContext ctx); 624 | /** 625 | * Visit a parse tree produced by {@link vbaParser#subStmt}. 626 | * @param ctx the parse tree 627 | * @return the visitor result 628 | */ 629 | T visitSubStmt(vbaParser.SubStmtContext ctx); 630 | /** 631 | * Visit a parse tree produced by {@link vbaParser#timeStmt}. 632 | * @param ctx the parse tree 633 | * @return the visitor result 634 | */ 635 | T visitTimeStmt(vbaParser.TimeStmtContext ctx); 636 | /** 637 | * Visit a parse tree produced by {@link vbaParser#typeStmt}. 638 | * @param ctx the parse tree 639 | * @return the visitor result 640 | */ 641 | T visitTypeStmt(vbaParser.TypeStmtContext ctx); 642 | /** 643 | * Visit a parse tree produced by {@link vbaParser#typeStmt_Element}. 644 | * @param ctx the parse tree 645 | * @return the visitor result 646 | */ 647 | T visitTypeStmt_Element(vbaParser.TypeStmt_ElementContext ctx); 648 | /** 649 | * Visit a parse tree produced by {@link vbaParser#typeOfStmt}. 650 | * @param ctx the parse tree 651 | * @return the visitor result 652 | */ 653 | T visitTypeOfStmt(vbaParser.TypeOfStmtContext ctx); 654 | /** 655 | * Visit a parse tree produced by {@link vbaParser#unloadStmt}. 656 | * @param ctx the parse tree 657 | * @return the visitor result 658 | */ 659 | T visitUnloadStmt(vbaParser.UnloadStmtContext ctx); 660 | /** 661 | * Visit a parse tree produced by {@link vbaParser#unlockStmt}. 662 | * @param ctx the parse tree 663 | * @return the visitor result 664 | */ 665 | T visitUnlockStmt(vbaParser.UnlockStmtContext ctx); 666 | /** 667 | * Visit a parse tree produced by the {@code vsStruct} 668 | * labeled alternative in {@link vbaParser#valueStmt}. 669 | * @param ctx the parse tree 670 | * @return the visitor result 671 | */ 672 | T visitVsStruct(vbaParser.VsStructContext ctx); 673 | /** 674 | * Visit a parse tree produced by the {@code vsAdd} 675 | * labeled alternative in {@link vbaParser#valueStmt}. 676 | * @param ctx the parse tree 677 | * @return the visitor result 678 | */ 679 | T visitVsAdd(vbaParser.VsAddContext ctx); 680 | /** 681 | * Visit a parse tree produced by the {@code vsLt} 682 | * labeled alternative in {@link vbaParser#valueStmt}. 683 | * @param ctx the parse tree 684 | * @return the visitor result 685 | */ 686 | T visitVsLt(vbaParser.VsLtContext ctx); 687 | /** 688 | * Visit a parse tree produced by the {@code vsAddressOf} 689 | * labeled alternative in {@link vbaParser#valueStmt}. 690 | * @param ctx the parse tree 691 | * @return the visitor result 692 | */ 693 | T visitVsAddressOf(vbaParser.VsAddressOfContext ctx); 694 | /** 695 | * Visit a parse tree produced by the {@code vsNew} 696 | * labeled alternative in {@link vbaParser#valueStmt}. 697 | * @param ctx the parse tree 698 | * @return the visitor result 699 | */ 700 | T visitVsNew(vbaParser.VsNewContext ctx); 701 | /** 702 | * Visit a parse tree produced by the {@code vsMult} 703 | * labeled alternative in {@link vbaParser#valueStmt}. 704 | * @param ctx the parse tree 705 | * @return the visitor result 706 | */ 707 | T visitVsMult(vbaParser.VsMultContext ctx); 708 | /** 709 | * Visit a parse tree produced by the {@code vsNegation} 710 | * labeled alternative in {@link vbaParser#valueStmt}. 711 | * @param ctx the parse tree 712 | * @return the visitor result 713 | */ 714 | T visitVsNegation(vbaParser.VsNegationContext ctx); 715 | /** 716 | * Visit a parse tree produced by the {@code vsAssign} 717 | * labeled alternative in {@link vbaParser#valueStmt}. 718 | * @param ctx the parse tree 719 | * @return the visitor result 720 | */ 721 | T visitVsAssign(vbaParser.VsAssignContext ctx); 722 | /** 723 | * Visit a parse tree produced by the {@code vsLike} 724 | * labeled alternative in {@link vbaParser#valueStmt}. 725 | * @param ctx the parse tree 726 | * @return the visitor result 727 | */ 728 | T visitVsLike(vbaParser.VsLikeContext ctx); 729 | /** 730 | * Visit a parse tree produced by the {@code vsDiv} 731 | * labeled alternative in {@link vbaParser#valueStmt}. 732 | * @param ctx the parse tree 733 | * @return the visitor result 734 | */ 735 | T visitVsDiv(vbaParser.VsDivContext ctx); 736 | /** 737 | * Visit a parse tree produced by the {@code vsPlus} 738 | * labeled alternative in {@link vbaParser#valueStmt}. 739 | * @param ctx the parse tree 740 | * @return the visitor result 741 | */ 742 | T visitVsPlus(vbaParser.VsPlusContext ctx); 743 | /** 744 | * Visit a parse tree produced by the {@code vsNot} 745 | * labeled alternative in {@link vbaParser#valueStmt}. 746 | * @param ctx the parse tree 747 | * @return the visitor result 748 | */ 749 | T visitVsNot(vbaParser.VsNotContext ctx); 750 | /** 751 | * Visit a parse tree produced by the {@code vsGeq} 752 | * labeled alternative in {@link vbaParser#valueStmt}. 753 | * @param ctx the parse tree 754 | * @return the visitor result 755 | */ 756 | T visitVsGeq(vbaParser.VsGeqContext ctx); 757 | /** 758 | * Visit a parse tree produced by the {@code vsTypeOf} 759 | * labeled alternative in {@link vbaParser#valueStmt}. 760 | * @param ctx the parse tree 761 | * @return the visitor result 762 | */ 763 | T visitVsTypeOf(vbaParser.VsTypeOfContext ctx); 764 | /** 765 | * Visit a parse tree produced by the {@code vsICS} 766 | * labeled alternative in {@link vbaParser#valueStmt}. 767 | * @param ctx the parse tree 768 | * @return the visitor result 769 | */ 770 | T visitVsICS(vbaParser.VsICSContext ctx); 771 | /** 772 | * Visit a parse tree produced by the {@code vsNeq} 773 | * labeled alternative in {@link vbaParser#valueStmt}. 774 | * @param ctx the parse tree 775 | * @return the visitor result 776 | */ 777 | T visitVsNeq(vbaParser.VsNeqContext ctx); 778 | /** 779 | * Visit a parse tree produced by the {@code vsXor} 780 | * labeled alternative in {@link vbaParser#valueStmt}. 781 | * @param ctx the parse tree 782 | * @return the visitor result 783 | */ 784 | T visitVsXor(vbaParser.VsXorContext ctx); 785 | /** 786 | * Visit a parse tree produced by the {@code vsAnd} 787 | * labeled alternative in {@link vbaParser#valueStmt}. 788 | * @param ctx the parse tree 789 | * @return the visitor result 790 | */ 791 | T visitVsAnd(vbaParser.VsAndContext ctx); 792 | /** 793 | * Visit a parse tree produced by the {@code vsLeq} 794 | * labeled alternative in {@link vbaParser#valueStmt}. 795 | * @param ctx the parse tree 796 | * @return the visitor result 797 | */ 798 | T visitVsLeq(vbaParser.VsLeqContext ctx); 799 | /** 800 | * Visit a parse tree produced by the {@code vsPow} 801 | * labeled alternative in {@link vbaParser#valueStmt}. 802 | * @param ctx the parse tree 803 | * @return the visitor result 804 | */ 805 | T visitVsPow(vbaParser.VsPowContext ctx); 806 | /** 807 | * Visit a parse tree produced by the {@code vsIs} 808 | * labeled alternative in {@link vbaParser#valueStmt}. 809 | * @param ctx the parse tree 810 | * @return the visitor result 811 | */ 812 | T visitVsIs(vbaParser.VsIsContext ctx); 813 | /** 814 | * Visit a parse tree produced by the {@code vsMod} 815 | * labeled alternative in {@link vbaParser#valueStmt}. 816 | * @param ctx the parse tree 817 | * @return the visitor result 818 | */ 819 | T visitVsMod(vbaParser.VsModContext ctx); 820 | /** 821 | * Visit a parse tree produced by the {@code vsAmp} 822 | * labeled alternative in {@link vbaParser#valueStmt}. 823 | * @param ctx the parse tree 824 | * @return the visitor result 825 | */ 826 | T visitVsAmp(vbaParser.VsAmpContext ctx); 827 | /** 828 | * Visit a parse tree produced by the {@code vsOr} 829 | * labeled alternative in {@link vbaParser#valueStmt}. 830 | * @param ctx the parse tree 831 | * @return the visitor result 832 | */ 833 | T visitVsOr(vbaParser.VsOrContext ctx); 834 | /** 835 | * Visit a parse tree produced by the {@code vsMinus} 836 | * labeled alternative in {@link vbaParser#valueStmt}. 837 | * @param ctx the parse tree 838 | * @return the visitor result 839 | */ 840 | T visitVsMinus(vbaParser.VsMinusContext ctx); 841 | /** 842 | * Visit a parse tree produced by the {@code vsLiteral} 843 | * labeled alternative in {@link vbaParser#valueStmt}. 844 | * @param ctx the parse tree 845 | * @return the visitor result 846 | */ 847 | T visitVsLiteral(vbaParser.VsLiteralContext ctx); 848 | /** 849 | * Visit a parse tree produced by the {@code vsEqv} 850 | * labeled alternative in {@link vbaParser#valueStmt}. 851 | * @param ctx the parse tree 852 | * @return the visitor result 853 | */ 854 | T visitVsEqv(vbaParser.VsEqvContext ctx); 855 | /** 856 | * Visit a parse tree produced by the {@code vsImp} 857 | * labeled alternative in {@link vbaParser#valueStmt}. 858 | * @param ctx the parse tree 859 | * @return the visitor result 860 | */ 861 | T visitVsImp(vbaParser.VsImpContext ctx); 862 | /** 863 | * Visit a parse tree produced by the {@code vsGt} 864 | * labeled alternative in {@link vbaParser#valueStmt}. 865 | * @param ctx the parse tree 866 | * @return the visitor result 867 | */ 868 | T visitVsGt(vbaParser.VsGtContext ctx); 869 | /** 870 | * Visit a parse tree produced by the {@code vsEq} 871 | * labeled alternative in {@link vbaParser#valueStmt}. 872 | * @param ctx the parse tree 873 | * @return the visitor result 874 | */ 875 | T visitVsEq(vbaParser.VsEqContext ctx); 876 | /** 877 | * Visit a parse tree produced by the {@code vsMid} 878 | * labeled alternative in {@link vbaParser#valueStmt}. 879 | * @param ctx the parse tree 880 | * @return the visitor result 881 | */ 882 | T visitVsMid(vbaParser.VsMidContext ctx); 883 | /** 884 | * Visit a parse tree produced by {@link vbaParser#variableStmt}. 885 | * @param ctx the parse tree 886 | * @return the visitor result 887 | */ 888 | T visitVariableStmt(vbaParser.VariableStmtContext ctx); 889 | /** 890 | * Visit a parse tree produced by {@link vbaParser#variableListStmt}. 891 | * @param ctx the parse tree 892 | * @return the visitor result 893 | */ 894 | T visitVariableListStmt(vbaParser.VariableListStmtContext ctx); 895 | /** 896 | * Visit a parse tree produced by {@link vbaParser#variableSubStmt}. 897 | * @param ctx the parse tree 898 | * @return the visitor result 899 | */ 900 | T visitVariableSubStmt(vbaParser.VariableSubStmtContext ctx); 901 | /** 902 | * Visit a parse tree produced by {@link vbaParser#whileWendStmt}. 903 | * @param ctx the parse tree 904 | * @return the visitor result 905 | */ 906 | T visitWhileWendStmt(vbaParser.WhileWendStmtContext ctx); 907 | /** 908 | * Visit a parse tree produced by {@link vbaParser#widthStmt}. 909 | * @param ctx the parse tree 910 | * @return the visitor result 911 | */ 912 | T visitWidthStmt(vbaParser.WidthStmtContext ctx); 913 | /** 914 | * Visit a parse tree produced by {@link vbaParser#withStmt}. 915 | * @param ctx the parse tree 916 | * @return the visitor result 917 | */ 918 | T visitWithStmt(vbaParser.WithStmtContext ctx); 919 | /** 920 | * Visit a parse tree produced by {@link vbaParser#writeStmt}. 921 | * @param ctx the parse tree 922 | * @return the visitor result 923 | */ 924 | T visitWriteStmt(vbaParser.WriteStmtContext ctx); 925 | /** 926 | * Visit a parse tree produced by {@link vbaParser#fileNumber}. 927 | * @param ctx the parse tree 928 | * @return the visitor result 929 | */ 930 | T visitFileNumber(vbaParser.FileNumberContext ctx); 931 | /** 932 | * Visit a parse tree produced by {@link vbaParser#explicitCallStmt}. 933 | * @param ctx the parse tree 934 | * @return the visitor result 935 | */ 936 | T visitExplicitCallStmt(vbaParser.ExplicitCallStmtContext ctx); 937 | /** 938 | * Visit a parse tree produced by {@link vbaParser#eCS_ProcedureCall}. 939 | * @param ctx the parse tree 940 | * @return the visitor result 941 | */ 942 | T visitECS_ProcedureCall(vbaParser.ECS_ProcedureCallContext ctx); 943 | /** 944 | * Visit a parse tree produced by {@link vbaParser#eCS_MemberProcedureCall}. 945 | * @param ctx the parse tree 946 | * @return the visitor result 947 | */ 948 | T visitECS_MemberProcedureCall(vbaParser.ECS_MemberProcedureCallContext ctx); 949 | /** 950 | * Visit a parse tree produced by {@link vbaParser#implicitCallStmt_InBlock}. 951 | * @param ctx the parse tree 952 | * @return the visitor result 953 | */ 954 | T visitImplicitCallStmt_InBlock(vbaParser.ImplicitCallStmt_InBlockContext ctx); 955 | /** 956 | * Visit a parse tree produced by {@link vbaParser#iCS_B_MemberProcedureCall}. 957 | * @param ctx the parse tree 958 | * @return the visitor result 959 | */ 960 | T visitICS_B_MemberProcedureCall(vbaParser.ICS_B_MemberProcedureCallContext ctx); 961 | /** 962 | * Visit a parse tree produced by {@link vbaParser#iCS_B_ProcedureCall}. 963 | * @param ctx the parse tree 964 | * @return the visitor result 965 | */ 966 | T visitICS_B_ProcedureCall(vbaParser.ICS_B_ProcedureCallContext ctx); 967 | /** 968 | * Visit a parse tree produced by {@link vbaParser#implicitCallStmt_InStmt}. 969 | * @param ctx the parse tree 970 | * @return the visitor result 971 | */ 972 | T visitImplicitCallStmt_InStmt(vbaParser.ImplicitCallStmt_InStmtContext ctx); 973 | /** 974 | * Visit a parse tree produced by {@link vbaParser#iCS_S_VariableOrProcedureCall}. 975 | * @param ctx the parse tree 976 | * @return the visitor result 977 | */ 978 | T visitICS_S_VariableOrProcedureCall(vbaParser.ICS_S_VariableOrProcedureCallContext ctx); 979 | /** 980 | * Visit a parse tree produced by {@link vbaParser#iCS_S_ProcedureOrArrayCall}. 981 | * @param ctx the parse tree 982 | * @return the visitor result 983 | */ 984 | T visitICS_S_ProcedureOrArrayCall(vbaParser.ICS_S_ProcedureOrArrayCallContext ctx); 985 | /** 986 | * Visit a parse tree produced by {@link vbaParser#iCS_S_MembersCall}. 987 | * @param ctx the parse tree 988 | * @return the visitor result 989 | */ 990 | T visitICS_S_MembersCall(vbaParser.ICS_S_MembersCallContext ctx); 991 | /** 992 | * Visit a parse tree produced by {@link vbaParser#iCS_S_MemberCall}. 993 | * @param ctx the parse tree 994 | * @return the visitor result 995 | */ 996 | T visitICS_S_MemberCall(vbaParser.ICS_S_MemberCallContext ctx); 997 | /** 998 | * Visit a parse tree produced by {@link vbaParser#iCS_S_DictionaryCall}. 999 | * @param ctx the parse tree 1000 | * @return the visitor result 1001 | */ 1002 | T visitICS_S_DictionaryCall(vbaParser.ICS_S_DictionaryCallContext ctx); 1003 | /** 1004 | * Visit a parse tree produced by {@link vbaParser#argsCall}. 1005 | * @param ctx the parse tree 1006 | * @return the visitor result 1007 | */ 1008 | T visitArgsCall(vbaParser.ArgsCallContext ctx); 1009 | /** 1010 | * Visit a parse tree produced by {@link vbaParser#argCall}. 1011 | * @param ctx the parse tree 1012 | * @return the visitor result 1013 | */ 1014 | T visitArgCall(vbaParser.ArgCallContext ctx); 1015 | /** 1016 | * Visit a parse tree produced by {@link vbaParser#dictionaryCallStmt}. 1017 | * @param ctx the parse tree 1018 | * @return the visitor result 1019 | */ 1020 | T visitDictionaryCallStmt(vbaParser.DictionaryCallStmtContext ctx); 1021 | /** 1022 | * Visit a parse tree produced by {@link vbaParser#argList}. 1023 | * @param ctx the parse tree 1024 | * @return the visitor result 1025 | */ 1026 | T visitArgList(vbaParser.ArgListContext ctx); 1027 | /** 1028 | * Visit a parse tree produced by {@link vbaParser#arg}. 1029 | * @param ctx the parse tree 1030 | * @return the visitor result 1031 | */ 1032 | T visitArg(vbaParser.ArgContext ctx); 1033 | /** 1034 | * Visit a parse tree produced by {@link vbaParser#argDefaultValue}. 1035 | * @param ctx the parse tree 1036 | * @return the visitor result 1037 | */ 1038 | T visitArgDefaultValue(vbaParser.ArgDefaultValueContext ctx); 1039 | /** 1040 | * Visit a parse tree produced by {@link vbaParser#subscripts}. 1041 | * @param ctx the parse tree 1042 | * @return the visitor result 1043 | */ 1044 | T visitSubscripts(vbaParser.SubscriptsContext ctx); 1045 | /** 1046 | * Visit a parse tree produced by {@link vbaParser#subscript}. 1047 | * @param ctx the parse tree 1048 | * @return the visitor result 1049 | */ 1050 | T visitSubscript(vbaParser.SubscriptContext ctx); 1051 | /** 1052 | * Visit a parse tree produced by {@link vbaParser#ambiguousIdentifier}. 1053 | * @param ctx the parse tree 1054 | * @return the visitor result 1055 | */ 1056 | T visitAmbiguousIdentifier(vbaParser.AmbiguousIdentifierContext ctx); 1057 | /** 1058 | * Visit a parse tree produced by {@link vbaParser#asTypeClause}. 1059 | * @param ctx the parse tree 1060 | * @return the visitor result 1061 | */ 1062 | T visitAsTypeClause(vbaParser.AsTypeClauseContext ctx); 1063 | /** 1064 | * Visit a parse tree produced by {@link vbaParser#baseType}. 1065 | * @param ctx the parse tree 1066 | * @return the visitor result 1067 | */ 1068 | T visitBaseType(vbaParser.BaseTypeContext ctx); 1069 | /** 1070 | * Visit a parse tree produced by {@link vbaParser#certainIdentifier}. 1071 | * @param ctx the parse tree 1072 | * @return the visitor result 1073 | */ 1074 | T visitCertainIdentifier(vbaParser.CertainIdentifierContext ctx); 1075 | /** 1076 | * Visit a parse tree produced by {@link vbaParser#comparisonOperator}. 1077 | * @param ctx the parse tree 1078 | * @return the visitor result 1079 | */ 1080 | T visitComparisonOperator(vbaParser.ComparisonOperatorContext ctx); 1081 | /** 1082 | * Visit a parse tree produced by {@link vbaParser#complexType}. 1083 | * @param ctx the parse tree 1084 | * @return the visitor result 1085 | */ 1086 | T visitComplexType(vbaParser.ComplexTypeContext ctx); 1087 | /** 1088 | * Visit a parse tree produced by {@link vbaParser#fieldLength}. 1089 | * @param ctx the parse tree 1090 | * @return the visitor result 1091 | */ 1092 | T visitFieldLength(vbaParser.FieldLengthContext ctx); 1093 | /** 1094 | * Visit a parse tree produced by {@link vbaParser#letterrange}. 1095 | * @param ctx the parse tree 1096 | * @return the visitor result 1097 | */ 1098 | T visitLetterrange(vbaParser.LetterrangeContext ctx); 1099 | /** 1100 | * Visit a parse tree produced by {@link vbaParser#lineLabel}. 1101 | * @param ctx the parse tree 1102 | * @return the visitor result 1103 | */ 1104 | T visitLineLabel(vbaParser.LineLabelContext ctx); 1105 | /** 1106 | * Visit a parse tree produced by {@link vbaParser#literal}. 1107 | * @param ctx the parse tree 1108 | * @return the visitor result 1109 | */ 1110 | T visitLiteral(vbaParser.LiteralContext ctx); 1111 | /** 1112 | * Visit a parse tree produced by {@link vbaParser#type}. 1113 | * @param ctx the parse tree 1114 | * @return the visitor result 1115 | */ 1116 | T visitType(vbaParser.TypeContext ctx); 1117 | /** 1118 | * Visit a parse tree produced by {@link vbaParser#typeHint}. 1119 | * @param ctx the parse tree 1120 | * @return the visitor result 1121 | */ 1122 | T visitTypeHint(vbaParser.TypeHintContext ctx); 1123 | /** 1124 | * Visit a parse tree produced by {@link vbaParser#visibility}. 1125 | * @param ctx the parse tree 1126 | * @return the visitor result 1127 | */ 1128 | T visitVisibility(vbaParser.VisibilityContext ctx); 1129 | /** 1130 | * Visit a parse tree produced by {@link vbaParser#ambiguousKeyword}. 1131 | * @param ctx the parse tree 1132 | * @return the visitor result 1133 | */ 1134 | T visitAmbiguousKeyword(vbaParser.AmbiguousKeywordContext ctx); 1135 | /** 1136 | * Visit a parse tree produced by {@link vbaParser#remComment}. 1137 | * @param ctx the parse tree 1138 | * @return the visitor result 1139 | */ 1140 | T visitRemComment(vbaParser.RemCommentContext ctx); 1141 | /** 1142 | * Visit a parse tree produced by {@link vbaParser#comment}. 1143 | * @param ctx the parse tree 1144 | * @return the visitor result 1145 | */ 1146 | T visitComment(vbaParser.CommentContext ctx); 1147 | /** 1148 | * Visit a parse tree produced by {@link vbaParser#endOfLine}. 1149 | * @param ctx the parse tree 1150 | * @return the visitor result 1151 | */ 1152 | T visitEndOfLine(vbaParser.EndOfLineContext ctx); 1153 | /** 1154 | * Visit a parse tree produced by {@link vbaParser#endOfStatement}. 1155 | * @param ctx the parse tree 1156 | * @return the visitor result 1157 | */ 1158 | T visitEndOfStatement(vbaParser.EndOfStatementContext ctx); 1159 | } -------------------------------------------------------------------------------- /src/VBAObfuscator/parser/vbaBaseVisitor.java: -------------------------------------------------------------------------------- 1 | // Generated from C:/dev/VBAObfuscator/src/VBAObfuscator/parser\vba.g4 by ANTLR 4.8 2 | package VBAObfuscator.parser; 3 | import org.antlr.v4.runtime.tree.AbstractParseTreeVisitor; 4 | 5 | /** 6 | * This class provides an empty implementation of {@link vbaVisitor}, 7 | * which can be extended to create a visitor which only needs to handle a subset 8 | * of the available methods. 9 | * 10 | * @param The return type of the visit operation. Use {@link Void} for 11 | * operations with no return type. 12 | */ 13 | public class vbaBaseVisitor extends AbstractParseTreeVisitor implements vbaVisitor { 14 | /** 15 | * {@inheritDoc} 16 | * 17 | *

The default implementation returns the result of calling 18 | * {@link #visitChildren} on {@code ctx}.

19 | */ 20 | @Override public T visitStartRule(vbaParser.StartRuleContext ctx) { return visitChildren(ctx); } 21 | /** 22 | * {@inheritDoc} 23 | * 24 | *

The default implementation returns the result of calling 25 | * {@link #visitChildren} on {@code ctx}.

26 | */ 27 | @Override public T visitModule(vbaParser.ModuleContext ctx) { return visitChildren(ctx); } 28 | /** 29 | * {@inheritDoc} 30 | * 31 | *

The default implementation returns the result of calling 32 | * {@link #visitChildren} on {@code ctx}.

33 | */ 34 | @Override public T visitModuleHeader(vbaParser.ModuleHeaderContext ctx) { return visitChildren(ctx); } 35 | /** 36 | * {@inheritDoc} 37 | * 38 | *

The default implementation returns the result of calling 39 | * {@link #visitChildren} on {@code ctx}.

40 | */ 41 | @Override public T visitModuleConfig(vbaParser.ModuleConfigContext ctx) { return visitChildren(ctx); } 42 | /** 43 | * {@inheritDoc} 44 | * 45 | *

The default implementation returns the result of calling 46 | * {@link #visitChildren} on {@code ctx}.

47 | */ 48 | @Override public T visitModuleConfigElement(vbaParser.ModuleConfigElementContext ctx) { return visitChildren(ctx); } 49 | /** 50 | * {@inheritDoc} 51 | * 52 | *

The default implementation returns the result of calling 53 | * {@link #visitChildren} on {@code ctx}.

54 | */ 55 | @Override public T visitModuleAttributes(vbaParser.ModuleAttributesContext ctx) { return visitChildren(ctx); } 56 | /** 57 | * {@inheritDoc} 58 | * 59 | *

The default implementation returns the result of calling 60 | * {@link #visitChildren} on {@code ctx}.

61 | */ 62 | @Override public T visitModuleDeclarations(vbaParser.ModuleDeclarationsContext ctx) { return visitChildren(ctx); } 63 | /** 64 | * {@inheritDoc} 65 | * 66 | *

The default implementation returns the result of calling 67 | * {@link #visitChildren} on {@code ctx}.

68 | */ 69 | @Override public T visitOptionBaseStmt(vbaParser.OptionBaseStmtContext ctx) { return visitChildren(ctx); } 70 | /** 71 | * {@inheritDoc} 72 | * 73 | *

The default implementation returns the result of calling 74 | * {@link #visitChildren} on {@code ctx}.

75 | */ 76 | @Override public T visitOptionCompareStmt(vbaParser.OptionCompareStmtContext ctx) { return visitChildren(ctx); } 77 | /** 78 | * {@inheritDoc} 79 | * 80 | *

The default implementation returns the result of calling 81 | * {@link #visitChildren} on {@code ctx}.

82 | */ 83 | @Override public T visitOptionExplicitStmt(vbaParser.OptionExplicitStmtContext ctx) { return visitChildren(ctx); } 84 | /** 85 | * {@inheritDoc} 86 | * 87 | *

The default implementation returns the result of calling 88 | * {@link #visitChildren} on {@code ctx}.

89 | */ 90 | @Override public T visitOptionPrivateModuleStmt(vbaParser.OptionPrivateModuleStmtContext ctx) { return visitChildren(ctx); } 91 | /** 92 | * {@inheritDoc} 93 | * 94 | *

The default implementation returns the result of calling 95 | * {@link #visitChildren} on {@code ctx}.

96 | */ 97 | @Override public T visitModuleDeclarationsElement(vbaParser.ModuleDeclarationsElementContext ctx) { return visitChildren(ctx); } 98 | /** 99 | * {@inheritDoc} 100 | * 101 | *

The default implementation returns the result of calling 102 | * {@link #visitChildren} on {@code ctx}.

103 | */ 104 | @Override public T visitMacroStmt(vbaParser.MacroStmtContext ctx) { return visitChildren(ctx); } 105 | /** 106 | * {@inheritDoc} 107 | * 108 | *

The default implementation returns the result of calling 109 | * {@link #visitChildren} on {@code ctx}.

110 | */ 111 | @Override public T visitModuleBody(vbaParser.ModuleBodyContext ctx) { return visitChildren(ctx); } 112 | /** 113 | * {@inheritDoc} 114 | * 115 | *

The default implementation returns the result of calling 116 | * {@link #visitChildren} on {@code ctx}.

117 | */ 118 | @Override public T visitModuleBodyElement(vbaParser.ModuleBodyElementContext ctx) { return visitChildren(ctx); } 119 | /** 120 | * {@inheritDoc} 121 | * 122 | *

The default implementation returns the result of calling 123 | * {@link #visitChildren} on {@code ctx}.

124 | */ 125 | @Override public T visitAttributeStmt(vbaParser.AttributeStmtContext ctx) { return visitChildren(ctx); } 126 | /** 127 | * {@inheritDoc} 128 | * 129 | *

The default implementation returns the result of calling 130 | * {@link #visitChildren} on {@code ctx}.

131 | */ 132 | @Override public T visitBlock(vbaParser.BlockContext ctx) { return visitChildren(ctx); } 133 | /** 134 | * {@inheritDoc} 135 | * 136 | *

The default implementation returns the result of calling 137 | * {@link #visitChildren} on {@code ctx}.

138 | */ 139 | @Override public T visitBlockStmt(vbaParser.BlockStmtContext ctx) { return visitChildren(ctx); } 140 | /** 141 | * {@inheritDoc} 142 | * 143 | *

The default implementation returns the result of calling 144 | * {@link #visitChildren} on {@code ctx}.

145 | */ 146 | @Override public T visitAppactivateStmt(vbaParser.AppactivateStmtContext ctx) { return visitChildren(ctx); } 147 | /** 148 | * {@inheritDoc} 149 | * 150 | *

The default implementation returns the result of calling 151 | * {@link #visitChildren} on {@code ctx}.

152 | */ 153 | @Override public T visitBeepStmt(vbaParser.BeepStmtContext ctx) { return visitChildren(ctx); } 154 | /** 155 | * {@inheritDoc} 156 | * 157 | *

The default implementation returns the result of calling 158 | * {@link #visitChildren} on {@code ctx}.

159 | */ 160 | @Override public T visitChdirStmt(vbaParser.ChdirStmtContext ctx) { return visitChildren(ctx); } 161 | /** 162 | * {@inheritDoc} 163 | * 164 | *

The default implementation returns the result of calling 165 | * {@link #visitChildren} on {@code ctx}.

166 | */ 167 | @Override public T visitChdriveStmt(vbaParser.ChdriveStmtContext ctx) { return visitChildren(ctx); } 168 | /** 169 | * {@inheritDoc} 170 | * 171 | *

The default implementation returns the result of calling 172 | * {@link #visitChildren} on {@code ctx}.

173 | */ 174 | @Override public T visitCloseStmt(vbaParser.CloseStmtContext ctx) { return visitChildren(ctx); } 175 | /** 176 | * {@inheritDoc} 177 | * 178 | *

The default implementation returns the result of calling 179 | * {@link #visitChildren} on {@code ctx}.

180 | */ 181 | @Override public T visitConstStmt(vbaParser.ConstStmtContext ctx) { return visitChildren(ctx); } 182 | /** 183 | * {@inheritDoc} 184 | * 185 | *

The default implementation returns the result of calling 186 | * {@link #visitChildren} on {@code ctx}.

187 | */ 188 | @Override public T visitConstSubStmt(vbaParser.ConstSubStmtContext ctx) { return visitChildren(ctx); } 189 | /** 190 | * {@inheritDoc} 191 | * 192 | *

The default implementation returns the result of calling 193 | * {@link #visitChildren} on {@code ctx}.

194 | */ 195 | @Override public T visitDateStmt(vbaParser.DateStmtContext ctx) { return visitChildren(ctx); } 196 | /** 197 | * {@inheritDoc} 198 | * 199 | *

The default implementation returns the result of calling 200 | * {@link #visitChildren} on {@code ctx}.

201 | */ 202 | @Override public T visitDeclareStmt(vbaParser.DeclareStmtContext ctx) { return visitChildren(ctx); } 203 | /** 204 | * {@inheritDoc} 205 | * 206 | *

The default implementation returns the result of calling 207 | * {@link #visitChildren} on {@code ctx}.

208 | */ 209 | @Override public T visitDeftypeStmt(vbaParser.DeftypeStmtContext ctx) { return visitChildren(ctx); } 210 | /** 211 | * {@inheritDoc} 212 | * 213 | *

The default implementation returns the result of calling 214 | * {@link #visitChildren} on {@code ctx}.

215 | */ 216 | @Override public T visitDeleteSettingStmt(vbaParser.DeleteSettingStmtContext ctx) { return visitChildren(ctx); } 217 | /** 218 | * {@inheritDoc} 219 | * 220 | *

The default implementation returns the result of calling 221 | * {@link #visitChildren} on {@code ctx}.

222 | */ 223 | @Override public T visitDoLoopStmt(vbaParser.DoLoopStmtContext ctx) { return visitChildren(ctx); } 224 | /** 225 | * {@inheritDoc} 226 | * 227 | *

The default implementation returns the result of calling 228 | * {@link #visitChildren} on {@code ctx}.

229 | */ 230 | @Override public T visitEndStmt(vbaParser.EndStmtContext ctx) { return visitChildren(ctx); } 231 | /** 232 | * {@inheritDoc} 233 | * 234 | *

The default implementation returns the result of calling 235 | * {@link #visitChildren} on {@code ctx}.

236 | */ 237 | @Override public T visitEnumerationStmt(vbaParser.EnumerationStmtContext ctx) { return visitChildren(ctx); } 238 | /** 239 | * {@inheritDoc} 240 | * 241 | *

The default implementation returns the result of calling 242 | * {@link #visitChildren} on {@code ctx}.

243 | */ 244 | @Override public T visitEnumerationStmt_Constant(vbaParser.EnumerationStmt_ConstantContext ctx) { return visitChildren(ctx); } 245 | /** 246 | * {@inheritDoc} 247 | * 248 | *

The default implementation returns the result of calling 249 | * {@link #visitChildren} on {@code ctx}.

250 | */ 251 | @Override public T visitEraseStmt(vbaParser.EraseStmtContext ctx) { return visitChildren(ctx); } 252 | /** 253 | * {@inheritDoc} 254 | * 255 | *

The default implementation returns the result of calling 256 | * {@link #visitChildren} on {@code ctx}.

257 | */ 258 | @Override public T visitErrorStmt(vbaParser.ErrorStmtContext ctx) { return visitChildren(ctx); } 259 | /** 260 | * {@inheritDoc} 261 | * 262 | *

The default implementation returns the result of calling 263 | * {@link #visitChildren} on {@code ctx}.

264 | */ 265 | @Override public T visitEventStmt(vbaParser.EventStmtContext ctx) { return visitChildren(ctx); } 266 | /** 267 | * {@inheritDoc} 268 | * 269 | *

The default implementation returns the result of calling 270 | * {@link #visitChildren} on {@code ctx}.

271 | */ 272 | @Override public T visitExitStmt(vbaParser.ExitStmtContext ctx) { return visitChildren(ctx); } 273 | /** 274 | * {@inheritDoc} 275 | * 276 | *

The default implementation returns the result of calling 277 | * {@link #visitChildren} on {@code ctx}.

278 | */ 279 | @Override public T visitFilecopyStmt(vbaParser.FilecopyStmtContext ctx) { return visitChildren(ctx); } 280 | /** 281 | * {@inheritDoc} 282 | * 283 | *

The default implementation returns the result of calling 284 | * {@link #visitChildren} on {@code ctx}.

285 | */ 286 | @Override public T visitForEachStmt(vbaParser.ForEachStmtContext ctx) { return visitChildren(ctx); } 287 | /** 288 | * {@inheritDoc} 289 | * 290 | *

The default implementation returns the result of calling 291 | * {@link #visitChildren} on {@code ctx}.

292 | */ 293 | @Override public T visitForNextStmt(vbaParser.ForNextStmtContext ctx) { return visitChildren(ctx); } 294 | /** 295 | * {@inheritDoc} 296 | * 297 | *

The default implementation returns the result of calling 298 | * {@link #visitChildren} on {@code ctx}.

299 | */ 300 | @Override public T visitFunctionStmt(vbaParser.FunctionStmtContext ctx) { return visitChildren(ctx); } 301 | /** 302 | * {@inheritDoc} 303 | * 304 | *

The default implementation returns the result of calling 305 | * {@link #visitChildren} on {@code ctx}.

306 | */ 307 | @Override public T visitGetStmt(vbaParser.GetStmtContext ctx) { return visitChildren(ctx); } 308 | /** 309 | * {@inheritDoc} 310 | * 311 | *

The default implementation returns the result of calling 312 | * {@link #visitChildren} on {@code ctx}.

313 | */ 314 | @Override public T visitGoSubStmt(vbaParser.GoSubStmtContext ctx) { return visitChildren(ctx); } 315 | /** 316 | * {@inheritDoc} 317 | * 318 | *

The default implementation returns the result of calling 319 | * {@link #visitChildren} on {@code ctx}.

320 | */ 321 | @Override public T visitGoToStmt(vbaParser.GoToStmtContext ctx) { return visitChildren(ctx); } 322 | /** 323 | * {@inheritDoc} 324 | * 325 | *

The default implementation returns the result of calling 326 | * {@link #visitChildren} on {@code ctx}.

327 | */ 328 | @Override public T visitInlineIfThenElse(vbaParser.InlineIfThenElseContext ctx) { return visitChildren(ctx); } 329 | /** 330 | * {@inheritDoc} 331 | * 332 | *

The default implementation returns the result of calling 333 | * {@link #visitChildren} on {@code ctx}.

334 | */ 335 | @Override public T visitBlockIfThenElse(vbaParser.BlockIfThenElseContext ctx) { return visitChildren(ctx); } 336 | /** 337 | * {@inheritDoc} 338 | * 339 | *

The default implementation returns the result of calling 340 | * {@link #visitChildren} on {@code ctx}.

341 | */ 342 | @Override public T visitIfBlockStmt(vbaParser.IfBlockStmtContext ctx) { return visitChildren(ctx); } 343 | /** 344 | * {@inheritDoc} 345 | * 346 | *

The default implementation returns the result of calling 347 | * {@link #visitChildren} on {@code ctx}.

348 | */ 349 | @Override public T visitIfConditionStmt(vbaParser.IfConditionStmtContext ctx) { return visitChildren(ctx); } 350 | /** 351 | * {@inheritDoc} 352 | * 353 | *

The default implementation returns the result of calling 354 | * {@link #visitChildren} on {@code ctx}.

355 | */ 356 | @Override public T visitIfElseIfBlockStmt(vbaParser.IfElseIfBlockStmtContext ctx) { return visitChildren(ctx); } 357 | /** 358 | * {@inheritDoc} 359 | * 360 | *

The default implementation returns the result of calling 361 | * {@link #visitChildren} on {@code ctx}.

362 | */ 363 | @Override public T visitIfElseBlockStmt(vbaParser.IfElseBlockStmtContext ctx) { return visitChildren(ctx); } 364 | /** 365 | * {@inheritDoc} 366 | * 367 | *

The default implementation returns the result of calling 368 | * {@link #visitChildren} on {@code ctx}.

369 | */ 370 | @Override public T visitImplementsStmt(vbaParser.ImplementsStmtContext ctx) { return visitChildren(ctx); } 371 | /** 372 | * {@inheritDoc} 373 | * 374 | *

The default implementation returns the result of calling 375 | * {@link #visitChildren} on {@code ctx}.

376 | */ 377 | @Override public T visitInputStmt(vbaParser.InputStmtContext ctx) { return visitChildren(ctx); } 378 | /** 379 | * {@inheritDoc} 380 | * 381 | *

The default implementation returns the result of calling 382 | * {@link #visitChildren} on {@code ctx}.

383 | */ 384 | @Override public T visitKillStmt(vbaParser.KillStmtContext ctx) { return visitChildren(ctx); } 385 | /** 386 | * {@inheritDoc} 387 | * 388 | *

The default implementation returns the result of calling 389 | * {@link #visitChildren} on {@code ctx}.

390 | */ 391 | @Override public T visitLetStmt(vbaParser.LetStmtContext ctx) { return visitChildren(ctx); } 392 | /** 393 | * {@inheritDoc} 394 | * 395 | *

The default implementation returns the result of calling 396 | * {@link #visitChildren} on {@code ctx}.

397 | */ 398 | @Override public T visitLineInputStmt(vbaParser.LineInputStmtContext ctx) { return visitChildren(ctx); } 399 | /** 400 | * {@inheritDoc} 401 | * 402 | *

The default implementation returns the result of calling 403 | * {@link #visitChildren} on {@code ctx}.

404 | */ 405 | @Override public T visitLoadStmt(vbaParser.LoadStmtContext ctx) { return visitChildren(ctx); } 406 | /** 407 | * {@inheritDoc} 408 | * 409 | *

The default implementation returns the result of calling 410 | * {@link #visitChildren} on {@code ctx}.

411 | */ 412 | @Override public T visitLockStmt(vbaParser.LockStmtContext ctx) { return visitChildren(ctx); } 413 | /** 414 | * {@inheritDoc} 415 | * 416 | *

The default implementation returns the result of calling 417 | * {@link #visitChildren} on {@code ctx}.

418 | */ 419 | @Override public T visitLsetStmt(vbaParser.LsetStmtContext ctx) { return visitChildren(ctx); } 420 | /** 421 | * {@inheritDoc} 422 | * 423 | *

The default implementation returns the result of calling 424 | * {@link #visitChildren} on {@code ctx}.

425 | */ 426 | @Override public T visitMacroConstStmt(vbaParser.MacroConstStmtContext ctx) { return visitChildren(ctx); } 427 | /** 428 | * {@inheritDoc} 429 | * 430 | *

The default implementation returns the result of calling 431 | * {@link #visitChildren} on {@code ctx}.

432 | */ 433 | @Override public T visitMacroIfThenElseStmt(vbaParser.MacroIfThenElseStmtContext ctx) { return visitChildren(ctx); } 434 | /** 435 | * {@inheritDoc} 436 | * 437 | *

The default implementation returns the result of calling 438 | * {@link #visitChildren} on {@code ctx}.

439 | */ 440 | @Override public T visitMacroIfBlockStmt(vbaParser.MacroIfBlockStmtContext ctx) { return visitChildren(ctx); } 441 | /** 442 | * {@inheritDoc} 443 | * 444 | *

The default implementation returns the result of calling 445 | * {@link #visitChildren} on {@code ctx}.

446 | */ 447 | @Override public T visitMacroElseIfBlockStmt(vbaParser.MacroElseIfBlockStmtContext ctx) { return visitChildren(ctx); } 448 | /** 449 | * {@inheritDoc} 450 | * 451 | *

The default implementation returns the result of calling 452 | * {@link #visitChildren} on {@code ctx}.

453 | */ 454 | @Override public T visitMacroElseBlockStmt(vbaParser.MacroElseBlockStmtContext ctx) { return visitChildren(ctx); } 455 | /** 456 | * {@inheritDoc} 457 | * 458 | *

The default implementation returns the result of calling 459 | * {@link #visitChildren} on {@code ctx}.

460 | */ 461 | @Override public T visitMidStmt(vbaParser.MidStmtContext ctx) { return visitChildren(ctx); } 462 | /** 463 | * {@inheritDoc} 464 | * 465 | *

The default implementation returns the result of calling 466 | * {@link #visitChildren} on {@code ctx}.

467 | */ 468 | @Override public T visitMkdirStmt(vbaParser.MkdirStmtContext ctx) { return visitChildren(ctx); } 469 | /** 470 | * {@inheritDoc} 471 | * 472 | *

The default implementation returns the result of calling 473 | * {@link #visitChildren} on {@code ctx}.

474 | */ 475 | @Override public T visitNameStmt(vbaParser.NameStmtContext ctx) { return visitChildren(ctx); } 476 | /** 477 | * {@inheritDoc} 478 | * 479 | *

The default implementation returns the result of calling 480 | * {@link #visitChildren} on {@code ctx}.

481 | */ 482 | @Override public T visitOnErrorStmt(vbaParser.OnErrorStmtContext ctx) { return visitChildren(ctx); } 483 | /** 484 | * {@inheritDoc} 485 | * 486 | *

The default implementation returns the result of calling 487 | * {@link #visitChildren} on {@code ctx}.

488 | */ 489 | @Override public T visitOnGoToStmt(vbaParser.OnGoToStmtContext ctx) { return visitChildren(ctx); } 490 | /** 491 | * {@inheritDoc} 492 | * 493 | *

The default implementation returns the result of calling 494 | * {@link #visitChildren} on {@code ctx}.

495 | */ 496 | @Override public T visitOnGoSubStmt(vbaParser.OnGoSubStmtContext ctx) { return visitChildren(ctx); } 497 | /** 498 | * {@inheritDoc} 499 | * 500 | *

The default implementation returns the result of calling 501 | * {@link #visitChildren} on {@code ctx}.

502 | */ 503 | @Override public T visitOpenStmt(vbaParser.OpenStmtContext ctx) { return visitChildren(ctx); } 504 | /** 505 | * {@inheritDoc} 506 | * 507 | *

The default implementation returns the result of calling 508 | * {@link #visitChildren} on {@code ctx}.

509 | */ 510 | @Override public T visitOutputList(vbaParser.OutputListContext ctx) { return visitChildren(ctx); } 511 | /** 512 | * {@inheritDoc} 513 | * 514 | *

The default implementation returns the result of calling 515 | * {@link #visitChildren} on {@code ctx}.

516 | */ 517 | @Override public T visitOutputList_Expression(vbaParser.OutputList_ExpressionContext ctx) { return visitChildren(ctx); } 518 | /** 519 | * {@inheritDoc} 520 | * 521 | *

The default implementation returns the result of calling 522 | * {@link #visitChildren} on {@code ctx}.

523 | */ 524 | @Override public T visitPrintStmt(vbaParser.PrintStmtContext ctx) { return visitChildren(ctx); } 525 | /** 526 | * {@inheritDoc} 527 | * 528 | *

The default implementation returns the result of calling 529 | * {@link #visitChildren} on {@code ctx}.

530 | */ 531 | @Override public T visitPropertyGetStmt(vbaParser.PropertyGetStmtContext ctx) { return visitChildren(ctx); } 532 | /** 533 | * {@inheritDoc} 534 | * 535 | *

The default implementation returns the result of calling 536 | * {@link #visitChildren} on {@code ctx}.

537 | */ 538 | @Override public T visitPropertySetStmt(vbaParser.PropertySetStmtContext ctx) { return visitChildren(ctx); } 539 | /** 540 | * {@inheritDoc} 541 | * 542 | *

The default implementation returns the result of calling 543 | * {@link #visitChildren} on {@code ctx}.

544 | */ 545 | @Override public T visitPropertyLetStmt(vbaParser.PropertyLetStmtContext ctx) { return visitChildren(ctx); } 546 | /** 547 | * {@inheritDoc} 548 | * 549 | *

The default implementation returns the result of calling 550 | * {@link #visitChildren} on {@code ctx}.

551 | */ 552 | @Override public T visitPutStmt(vbaParser.PutStmtContext ctx) { return visitChildren(ctx); } 553 | /** 554 | * {@inheritDoc} 555 | * 556 | *

The default implementation returns the result of calling 557 | * {@link #visitChildren} on {@code ctx}.

558 | */ 559 | @Override public T visitRaiseEventStmt(vbaParser.RaiseEventStmtContext ctx) { return visitChildren(ctx); } 560 | /** 561 | * {@inheritDoc} 562 | * 563 | *

The default implementation returns the result of calling 564 | * {@link #visitChildren} on {@code ctx}.

565 | */ 566 | @Override public T visitRandomizeStmt(vbaParser.RandomizeStmtContext ctx) { return visitChildren(ctx); } 567 | /** 568 | * {@inheritDoc} 569 | * 570 | *

The default implementation returns the result of calling 571 | * {@link #visitChildren} on {@code ctx}.

572 | */ 573 | @Override public T visitRedimStmt(vbaParser.RedimStmtContext ctx) { return visitChildren(ctx); } 574 | /** 575 | * {@inheritDoc} 576 | * 577 | *

The default implementation returns the result of calling 578 | * {@link #visitChildren} on {@code ctx}.

579 | */ 580 | @Override public T visitRedimSubStmt(vbaParser.RedimSubStmtContext ctx) { return visitChildren(ctx); } 581 | /** 582 | * {@inheritDoc} 583 | * 584 | *

The default implementation returns the result of calling 585 | * {@link #visitChildren} on {@code ctx}.

586 | */ 587 | @Override public T visitResetStmt(vbaParser.ResetStmtContext ctx) { return visitChildren(ctx); } 588 | /** 589 | * {@inheritDoc} 590 | * 591 | *

The default implementation returns the result of calling 592 | * {@link #visitChildren} on {@code ctx}.

593 | */ 594 | @Override public T visitResumeStmt(vbaParser.ResumeStmtContext ctx) { return visitChildren(ctx); } 595 | /** 596 | * {@inheritDoc} 597 | * 598 | *

The default implementation returns the result of calling 599 | * {@link #visitChildren} on {@code ctx}.

600 | */ 601 | @Override public T visitReturnStmt(vbaParser.ReturnStmtContext ctx) { return visitChildren(ctx); } 602 | /** 603 | * {@inheritDoc} 604 | * 605 | *

The default implementation returns the result of calling 606 | * {@link #visitChildren} on {@code ctx}.

607 | */ 608 | @Override public T visitRmdirStmt(vbaParser.RmdirStmtContext ctx) { return visitChildren(ctx); } 609 | /** 610 | * {@inheritDoc} 611 | * 612 | *

The default implementation returns the result of calling 613 | * {@link #visitChildren} on {@code ctx}.

614 | */ 615 | @Override public T visitRsetStmt(vbaParser.RsetStmtContext ctx) { return visitChildren(ctx); } 616 | /** 617 | * {@inheritDoc} 618 | * 619 | *

The default implementation returns the result of calling 620 | * {@link #visitChildren} on {@code ctx}.

621 | */ 622 | @Override public T visitSavepictureStmt(vbaParser.SavepictureStmtContext ctx) { return visitChildren(ctx); } 623 | /** 624 | * {@inheritDoc} 625 | * 626 | *

The default implementation returns the result of calling 627 | * {@link #visitChildren} on {@code ctx}.

628 | */ 629 | @Override public T visitSaveSettingStmt(vbaParser.SaveSettingStmtContext ctx) { return visitChildren(ctx); } 630 | /** 631 | * {@inheritDoc} 632 | * 633 | *

The default implementation returns the result of calling 634 | * {@link #visitChildren} on {@code ctx}.

635 | */ 636 | @Override public T visitSeekStmt(vbaParser.SeekStmtContext ctx) { return visitChildren(ctx); } 637 | /** 638 | * {@inheritDoc} 639 | * 640 | *

The default implementation returns the result of calling 641 | * {@link #visitChildren} on {@code ctx}.

642 | */ 643 | @Override public T visitSelectCaseStmt(vbaParser.SelectCaseStmtContext ctx) { return visitChildren(ctx); } 644 | /** 645 | * {@inheritDoc} 646 | * 647 | *

The default implementation returns the result of calling 648 | * {@link #visitChildren} on {@code ctx}.

649 | */ 650 | @Override public T visitCaseCondIs(vbaParser.CaseCondIsContext ctx) { return visitChildren(ctx); } 651 | /** 652 | * {@inheritDoc} 653 | * 654 | *

The default implementation returns the result of calling 655 | * {@link #visitChildren} on {@code ctx}.

656 | */ 657 | @Override public T visitCaseCondTo(vbaParser.CaseCondToContext ctx) { return visitChildren(ctx); } 658 | /** 659 | * {@inheritDoc} 660 | * 661 | *

The default implementation returns the result of calling 662 | * {@link #visitChildren} on {@code ctx}.

663 | */ 664 | @Override public T visitCaseCondValue(vbaParser.CaseCondValueContext ctx) { return visitChildren(ctx); } 665 | /** 666 | * {@inheritDoc} 667 | * 668 | *

The default implementation returns the result of calling 669 | * {@link #visitChildren} on {@code ctx}.

670 | */ 671 | @Override public T visitSC_Case(vbaParser.SC_CaseContext ctx) { return visitChildren(ctx); } 672 | /** 673 | * {@inheritDoc} 674 | * 675 | *

The default implementation returns the result of calling 676 | * {@link #visitChildren} on {@code ctx}.

677 | */ 678 | @Override public T visitCaseCondElse(vbaParser.CaseCondElseContext ctx) { return visitChildren(ctx); } 679 | /** 680 | * {@inheritDoc} 681 | * 682 | *

The default implementation returns the result of calling 683 | * {@link #visitChildren} on {@code ctx}.

684 | */ 685 | @Override public T visitCaseCondSelection(vbaParser.CaseCondSelectionContext ctx) { return visitChildren(ctx); } 686 | /** 687 | * {@inheritDoc} 688 | * 689 | *

The default implementation returns the result of calling 690 | * {@link #visitChildren} on {@code ctx}.

691 | */ 692 | @Override public T visitSendkeysStmt(vbaParser.SendkeysStmtContext ctx) { return visitChildren(ctx); } 693 | /** 694 | * {@inheritDoc} 695 | * 696 | *

The default implementation returns the result of calling 697 | * {@link #visitChildren} on {@code ctx}.

698 | */ 699 | @Override public T visitSetattrStmt(vbaParser.SetattrStmtContext ctx) { return visitChildren(ctx); } 700 | /** 701 | * {@inheritDoc} 702 | * 703 | *

The default implementation returns the result of calling 704 | * {@link #visitChildren} on {@code ctx}.

705 | */ 706 | @Override public T visitSetStmt(vbaParser.SetStmtContext ctx) { return visitChildren(ctx); } 707 | /** 708 | * {@inheritDoc} 709 | * 710 | *

The default implementation returns the result of calling 711 | * {@link #visitChildren} on {@code ctx}.

712 | */ 713 | @Override public T visitStopStmt(vbaParser.StopStmtContext ctx) { return visitChildren(ctx); } 714 | /** 715 | * {@inheritDoc} 716 | * 717 | *

The default implementation returns the result of calling 718 | * {@link #visitChildren} on {@code ctx}.

719 | */ 720 | @Override public T visitSubStmt(vbaParser.SubStmtContext ctx) { return visitChildren(ctx); } 721 | /** 722 | * {@inheritDoc} 723 | * 724 | *

The default implementation returns the result of calling 725 | * {@link #visitChildren} on {@code ctx}.

726 | */ 727 | @Override public T visitTimeStmt(vbaParser.TimeStmtContext ctx) { return visitChildren(ctx); } 728 | /** 729 | * {@inheritDoc} 730 | * 731 | *

The default implementation returns the result of calling 732 | * {@link #visitChildren} on {@code ctx}.

733 | */ 734 | @Override public T visitTypeStmt(vbaParser.TypeStmtContext ctx) { return visitChildren(ctx); } 735 | /** 736 | * {@inheritDoc} 737 | * 738 | *

The default implementation returns the result of calling 739 | * {@link #visitChildren} on {@code ctx}.

740 | */ 741 | @Override public T visitTypeStmt_Element(vbaParser.TypeStmt_ElementContext ctx) { return visitChildren(ctx); } 742 | /** 743 | * {@inheritDoc} 744 | * 745 | *

The default implementation returns the result of calling 746 | * {@link #visitChildren} on {@code ctx}.

747 | */ 748 | @Override public T visitTypeOfStmt(vbaParser.TypeOfStmtContext ctx) { return visitChildren(ctx); } 749 | /** 750 | * {@inheritDoc} 751 | * 752 | *

The default implementation returns the result of calling 753 | * {@link #visitChildren} on {@code ctx}.

754 | */ 755 | @Override public T visitUnloadStmt(vbaParser.UnloadStmtContext ctx) { return visitChildren(ctx); } 756 | /** 757 | * {@inheritDoc} 758 | * 759 | *

The default implementation returns the result of calling 760 | * {@link #visitChildren} on {@code ctx}.

761 | */ 762 | @Override public T visitUnlockStmt(vbaParser.UnlockStmtContext ctx) { return visitChildren(ctx); } 763 | /** 764 | * {@inheritDoc} 765 | * 766 | *

The default implementation returns the result of calling 767 | * {@link #visitChildren} on {@code ctx}.

768 | */ 769 | @Override public T visitVsStruct(vbaParser.VsStructContext ctx) { return visitChildren(ctx); } 770 | /** 771 | * {@inheritDoc} 772 | * 773 | *

The default implementation returns the result of calling 774 | * {@link #visitChildren} on {@code ctx}.

775 | */ 776 | @Override public T visitVsAdd(vbaParser.VsAddContext ctx) { return visitChildren(ctx); } 777 | /** 778 | * {@inheritDoc} 779 | * 780 | *

The default implementation returns the result of calling 781 | * {@link #visitChildren} on {@code ctx}.

782 | */ 783 | @Override public T visitVsLt(vbaParser.VsLtContext ctx) { return visitChildren(ctx); } 784 | /** 785 | * {@inheritDoc} 786 | * 787 | *

The default implementation returns the result of calling 788 | * {@link #visitChildren} on {@code ctx}.

789 | */ 790 | @Override public T visitVsAddressOf(vbaParser.VsAddressOfContext ctx) { return visitChildren(ctx); } 791 | /** 792 | * {@inheritDoc} 793 | * 794 | *

The default implementation returns the result of calling 795 | * {@link #visitChildren} on {@code ctx}.

796 | */ 797 | @Override public T visitVsNew(vbaParser.VsNewContext ctx) { return visitChildren(ctx); } 798 | /** 799 | * {@inheritDoc} 800 | * 801 | *

The default implementation returns the result of calling 802 | * {@link #visitChildren} on {@code ctx}.

803 | */ 804 | @Override public T visitVsMult(vbaParser.VsMultContext ctx) { return visitChildren(ctx); } 805 | /** 806 | * {@inheritDoc} 807 | * 808 | *

The default implementation returns the result of calling 809 | * {@link #visitChildren} on {@code ctx}.

810 | */ 811 | @Override public T visitVsNegation(vbaParser.VsNegationContext ctx) { return visitChildren(ctx); } 812 | /** 813 | * {@inheritDoc} 814 | * 815 | *

The default implementation returns the result of calling 816 | * {@link #visitChildren} on {@code ctx}.

817 | */ 818 | @Override public T visitVsAssign(vbaParser.VsAssignContext ctx) { return visitChildren(ctx); } 819 | /** 820 | * {@inheritDoc} 821 | * 822 | *

The default implementation returns the result of calling 823 | * {@link #visitChildren} on {@code ctx}.

824 | */ 825 | @Override public T visitVsLike(vbaParser.VsLikeContext ctx) { return visitChildren(ctx); } 826 | /** 827 | * {@inheritDoc} 828 | * 829 | *

The default implementation returns the result of calling 830 | * {@link #visitChildren} on {@code ctx}.

831 | */ 832 | @Override public T visitVsDiv(vbaParser.VsDivContext ctx) { return visitChildren(ctx); } 833 | /** 834 | * {@inheritDoc} 835 | * 836 | *

The default implementation returns the result of calling 837 | * {@link #visitChildren} on {@code ctx}.

838 | */ 839 | @Override public T visitVsPlus(vbaParser.VsPlusContext ctx) { return visitChildren(ctx); } 840 | /** 841 | * {@inheritDoc} 842 | * 843 | *

The default implementation returns the result of calling 844 | * {@link #visitChildren} on {@code ctx}.

845 | */ 846 | @Override public T visitVsNot(vbaParser.VsNotContext ctx) { return visitChildren(ctx); } 847 | /** 848 | * {@inheritDoc} 849 | * 850 | *

The default implementation returns the result of calling 851 | * {@link #visitChildren} on {@code ctx}.

852 | */ 853 | @Override public T visitVsGeq(vbaParser.VsGeqContext ctx) { return visitChildren(ctx); } 854 | /** 855 | * {@inheritDoc} 856 | * 857 | *

The default implementation returns the result of calling 858 | * {@link #visitChildren} on {@code ctx}.

859 | */ 860 | @Override public T visitVsTypeOf(vbaParser.VsTypeOfContext ctx) { return visitChildren(ctx); } 861 | /** 862 | * {@inheritDoc} 863 | * 864 | *

The default implementation returns the result of calling 865 | * {@link #visitChildren} on {@code ctx}.

866 | */ 867 | @Override public T visitVsICS(vbaParser.VsICSContext ctx) { return visitChildren(ctx); } 868 | /** 869 | * {@inheritDoc} 870 | * 871 | *

The default implementation returns the result of calling 872 | * {@link #visitChildren} on {@code ctx}.

873 | */ 874 | @Override public T visitVsNeq(vbaParser.VsNeqContext ctx) { return visitChildren(ctx); } 875 | /** 876 | * {@inheritDoc} 877 | * 878 | *

The default implementation returns the result of calling 879 | * {@link #visitChildren} on {@code ctx}.

880 | */ 881 | @Override public T visitVsXor(vbaParser.VsXorContext ctx) { return visitChildren(ctx); } 882 | /** 883 | * {@inheritDoc} 884 | * 885 | *

The default implementation returns the result of calling 886 | * {@link #visitChildren} on {@code ctx}.

887 | */ 888 | @Override public T visitVsAnd(vbaParser.VsAndContext ctx) { return visitChildren(ctx); } 889 | /** 890 | * {@inheritDoc} 891 | * 892 | *

The default implementation returns the result of calling 893 | * {@link #visitChildren} on {@code ctx}.

894 | */ 895 | @Override public T visitVsLeq(vbaParser.VsLeqContext ctx) { return visitChildren(ctx); } 896 | /** 897 | * {@inheritDoc} 898 | * 899 | *

The default implementation returns the result of calling 900 | * {@link #visitChildren} on {@code ctx}.

901 | */ 902 | @Override public T visitVsPow(vbaParser.VsPowContext ctx) { return visitChildren(ctx); } 903 | /** 904 | * {@inheritDoc} 905 | * 906 | *

The default implementation returns the result of calling 907 | * {@link #visitChildren} on {@code ctx}.

908 | */ 909 | @Override public T visitVsIs(vbaParser.VsIsContext ctx) { return visitChildren(ctx); } 910 | /** 911 | * {@inheritDoc} 912 | * 913 | *

The default implementation returns the result of calling 914 | * {@link #visitChildren} on {@code ctx}.

915 | */ 916 | @Override public T visitVsMod(vbaParser.VsModContext ctx) { return visitChildren(ctx); } 917 | /** 918 | * {@inheritDoc} 919 | * 920 | *

The default implementation returns the result of calling 921 | * {@link #visitChildren} on {@code ctx}.

922 | */ 923 | @Override public T visitVsAmp(vbaParser.VsAmpContext ctx) { return visitChildren(ctx); } 924 | /** 925 | * {@inheritDoc} 926 | * 927 | *

The default implementation returns the result of calling 928 | * {@link #visitChildren} on {@code ctx}.

929 | */ 930 | @Override public T visitVsOr(vbaParser.VsOrContext ctx) { return visitChildren(ctx); } 931 | /** 932 | * {@inheritDoc} 933 | * 934 | *

The default implementation returns the result of calling 935 | * {@link #visitChildren} on {@code ctx}.

936 | */ 937 | @Override public T visitVsMinus(vbaParser.VsMinusContext ctx) { return visitChildren(ctx); } 938 | /** 939 | * {@inheritDoc} 940 | * 941 | *

The default implementation returns the result of calling 942 | * {@link #visitChildren} on {@code ctx}.

943 | */ 944 | @Override public T visitVsLiteral(vbaParser.VsLiteralContext ctx) { return visitChildren(ctx); } 945 | /** 946 | * {@inheritDoc} 947 | * 948 | *

The default implementation returns the result of calling 949 | * {@link #visitChildren} on {@code ctx}.

950 | */ 951 | @Override public T visitVsEqv(vbaParser.VsEqvContext ctx) { return visitChildren(ctx); } 952 | /** 953 | * {@inheritDoc} 954 | * 955 | *

The default implementation returns the result of calling 956 | * {@link #visitChildren} on {@code ctx}.

957 | */ 958 | @Override public T visitVsImp(vbaParser.VsImpContext ctx) { return visitChildren(ctx); } 959 | /** 960 | * {@inheritDoc} 961 | * 962 | *

The default implementation returns the result of calling 963 | * {@link #visitChildren} on {@code ctx}.

964 | */ 965 | @Override public T visitVsGt(vbaParser.VsGtContext ctx) { return visitChildren(ctx); } 966 | /** 967 | * {@inheritDoc} 968 | * 969 | *

The default implementation returns the result of calling 970 | * {@link #visitChildren} on {@code ctx}.

971 | */ 972 | @Override public T visitVsEq(vbaParser.VsEqContext ctx) { return visitChildren(ctx); } 973 | /** 974 | * {@inheritDoc} 975 | * 976 | *

The default implementation returns the result of calling 977 | * {@link #visitChildren} on {@code ctx}.

978 | */ 979 | @Override public T visitVsMid(vbaParser.VsMidContext ctx) { return visitChildren(ctx); } 980 | /** 981 | * {@inheritDoc} 982 | * 983 | *

The default implementation returns the result of calling 984 | * {@link #visitChildren} on {@code ctx}.

985 | */ 986 | @Override public T visitVariableStmt(vbaParser.VariableStmtContext ctx) { return visitChildren(ctx); } 987 | /** 988 | * {@inheritDoc} 989 | * 990 | *

The default implementation returns the result of calling 991 | * {@link #visitChildren} on {@code ctx}.

992 | */ 993 | @Override public T visitVariableListStmt(vbaParser.VariableListStmtContext ctx) { return visitChildren(ctx); } 994 | /** 995 | * {@inheritDoc} 996 | * 997 | *

The default implementation returns the result of calling 998 | * {@link #visitChildren} on {@code ctx}.

999 | */ 1000 | @Override public T visitVariableSubStmt(vbaParser.VariableSubStmtContext ctx) { return visitChildren(ctx); } 1001 | /** 1002 | * {@inheritDoc} 1003 | * 1004 | *

The default implementation returns the result of calling 1005 | * {@link #visitChildren} on {@code ctx}.

1006 | */ 1007 | @Override public T visitWhileWendStmt(vbaParser.WhileWendStmtContext ctx) { return visitChildren(ctx); } 1008 | /** 1009 | * {@inheritDoc} 1010 | * 1011 | *

The default implementation returns the result of calling 1012 | * {@link #visitChildren} on {@code ctx}.

1013 | */ 1014 | @Override public T visitWidthStmt(vbaParser.WidthStmtContext ctx) { return visitChildren(ctx); } 1015 | /** 1016 | * {@inheritDoc} 1017 | * 1018 | *

The default implementation returns the result of calling 1019 | * {@link #visitChildren} on {@code ctx}.

1020 | */ 1021 | @Override public T visitWithStmt(vbaParser.WithStmtContext ctx) { return visitChildren(ctx); } 1022 | /** 1023 | * {@inheritDoc} 1024 | * 1025 | *

The default implementation returns the result of calling 1026 | * {@link #visitChildren} on {@code ctx}.

1027 | */ 1028 | @Override public T visitWriteStmt(vbaParser.WriteStmtContext ctx) { return visitChildren(ctx); } 1029 | /** 1030 | * {@inheritDoc} 1031 | * 1032 | *

The default implementation returns the result of calling 1033 | * {@link #visitChildren} on {@code ctx}.

1034 | */ 1035 | @Override public T visitFileNumber(vbaParser.FileNumberContext ctx) { return visitChildren(ctx); } 1036 | /** 1037 | * {@inheritDoc} 1038 | * 1039 | *

The default implementation returns the result of calling 1040 | * {@link #visitChildren} on {@code ctx}.

1041 | */ 1042 | @Override public T visitExplicitCallStmt(vbaParser.ExplicitCallStmtContext ctx) { return visitChildren(ctx); } 1043 | /** 1044 | * {@inheritDoc} 1045 | * 1046 | *

The default implementation returns the result of calling 1047 | * {@link #visitChildren} on {@code ctx}.

1048 | */ 1049 | @Override public T visitECS_ProcedureCall(vbaParser.ECS_ProcedureCallContext ctx) { return visitChildren(ctx); } 1050 | /** 1051 | * {@inheritDoc} 1052 | * 1053 | *

The default implementation returns the result of calling 1054 | * {@link #visitChildren} on {@code ctx}.

1055 | */ 1056 | @Override public T visitECS_MemberProcedureCall(vbaParser.ECS_MemberProcedureCallContext ctx) { return visitChildren(ctx); } 1057 | /** 1058 | * {@inheritDoc} 1059 | * 1060 | *

The default implementation returns the result of calling 1061 | * {@link #visitChildren} on {@code ctx}.

1062 | */ 1063 | @Override public T visitImplicitCallStmt_InBlock(vbaParser.ImplicitCallStmt_InBlockContext ctx) { return visitChildren(ctx); } 1064 | /** 1065 | * {@inheritDoc} 1066 | * 1067 | *

The default implementation returns the result of calling 1068 | * {@link #visitChildren} on {@code ctx}.

1069 | */ 1070 | @Override public T visitICS_B_MemberProcedureCall(vbaParser.ICS_B_MemberProcedureCallContext ctx) { return visitChildren(ctx); } 1071 | /** 1072 | * {@inheritDoc} 1073 | * 1074 | *

The default implementation returns the result of calling 1075 | * {@link #visitChildren} on {@code ctx}.

1076 | */ 1077 | @Override public T visitICS_B_ProcedureCall(vbaParser.ICS_B_ProcedureCallContext ctx) { return visitChildren(ctx); } 1078 | /** 1079 | * {@inheritDoc} 1080 | * 1081 | *

The default implementation returns the result of calling 1082 | * {@link #visitChildren} on {@code ctx}.

1083 | */ 1084 | @Override public T visitImplicitCallStmt_InStmt(vbaParser.ImplicitCallStmt_InStmtContext ctx) { return visitChildren(ctx); } 1085 | /** 1086 | * {@inheritDoc} 1087 | * 1088 | *

The default implementation returns the result of calling 1089 | * {@link #visitChildren} on {@code ctx}.

1090 | */ 1091 | @Override public T visitICS_S_VariableOrProcedureCall(vbaParser.ICS_S_VariableOrProcedureCallContext ctx) { return visitChildren(ctx); } 1092 | /** 1093 | * {@inheritDoc} 1094 | * 1095 | *

The default implementation returns the result of calling 1096 | * {@link #visitChildren} on {@code ctx}.

1097 | */ 1098 | @Override public T visitICS_S_ProcedureOrArrayCall(vbaParser.ICS_S_ProcedureOrArrayCallContext ctx) { return visitChildren(ctx); } 1099 | /** 1100 | * {@inheritDoc} 1101 | * 1102 | *

The default implementation returns the result of calling 1103 | * {@link #visitChildren} on {@code ctx}.

1104 | */ 1105 | @Override public T visitICS_S_MembersCall(vbaParser.ICS_S_MembersCallContext ctx) { return visitChildren(ctx); } 1106 | /** 1107 | * {@inheritDoc} 1108 | * 1109 | *

The default implementation returns the result of calling 1110 | * {@link #visitChildren} on {@code ctx}.

1111 | */ 1112 | @Override public T visitICS_S_MemberCall(vbaParser.ICS_S_MemberCallContext ctx) { return visitChildren(ctx); } 1113 | /** 1114 | * {@inheritDoc} 1115 | * 1116 | *

The default implementation returns the result of calling 1117 | * {@link #visitChildren} on {@code ctx}.

1118 | */ 1119 | @Override public T visitICS_S_DictionaryCall(vbaParser.ICS_S_DictionaryCallContext ctx) { return visitChildren(ctx); } 1120 | /** 1121 | * {@inheritDoc} 1122 | * 1123 | *

The default implementation returns the result of calling 1124 | * {@link #visitChildren} on {@code ctx}.

1125 | */ 1126 | @Override public T visitArgsCall(vbaParser.ArgsCallContext ctx) { return visitChildren(ctx); } 1127 | /** 1128 | * {@inheritDoc} 1129 | * 1130 | *

The default implementation returns the result of calling 1131 | * {@link #visitChildren} on {@code ctx}.

1132 | */ 1133 | @Override public T visitArgCall(vbaParser.ArgCallContext ctx) { return visitChildren(ctx); } 1134 | /** 1135 | * {@inheritDoc} 1136 | * 1137 | *

The default implementation returns the result of calling 1138 | * {@link #visitChildren} on {@code ctx}.

1139 | */ 1140 | @Override public T visitDictionaryCallStmt(vbaParser.DictionaryCallStmtContext ctx) { return visitChildren(ctx); } 1141 | /** 1142 | * {@inheritDoc} 1143 | * 1144 | *

The default implementation returns the result of calling 1145 | * {@link #visitChildren} on {@code ctx}.

1146 | */ 1147 | @Override public T visitArgList(vbaParser.ArgListContext ctx) { return visitChildren(ctx); } 1148 | /** 1149 | * {@inheritDoc} 1150 | * 1151 | *

The default implementation returns the result of calling 1152 | * {@link #visitChildren} on {@code ctx}.

1153 | */ 1154 | @Override public T visitArg(vbaParser.ArgContext ctx) { return visitChildren(ctx); } 1155 | /** 1156 | * {@inheritDoc} 1157 | * 1158 | *

The default implementation returns the result of calling 1159 | * {@link #visitChildren} on {@code ctx}.

1160 | */ 1161 | @Override public T visitArgDefaultValue(vbaParser.ArgDefaultValueContext ctx) { return visitChildren(ctx); } 1162 | /** 1163 | * {@inheritDoc} 1164 | * 1165 | *

The default implementation returns the result of calling 1166 | * {@link #visitChildren} on {@code ctx}.

1167 | */ 1168 | @Override public T visitSubscripts(vbaParser.SubscriptsContext ctx) { return visitChildren(ctx); } 1169 | /** 1170 | * {@inheritDoc} 1171 | * 1172 | *

The default implementation returns the result of calling 1173 | * {@link #visitChildren} on {@code ctx}.

1174 | */ 1175 | @Override public T visitSubscript(vbaParser.SubscriptContext ctx) { return visitChildren(ctx); } 1176 | /** 1177 | * {@inheritDoc} 1178 | * 1179 | *

The default implementation returns the result of calling 1180 | * {@link #visitChildren} on {@code ctx}.

1181 | */ 1182 | @Override public T visitAmbiguousIdentifier(vbaParser.AmbiguousIdentifierContext ctx) { return visitChildren(ctx); } 1183 | /** 1184 | * {@inheritDoc} 1185 | * 1186 | *

The default implementation returns the result of calling 1187 | * {@link #visitChildren} on {@code ctx}.

1188 | */ 1189 | @Override public T visitAsTypeClause(vbaParser.AsTypeClauseContext ctx) { return visitChildren(ctx); } 1190 | /** 1191 | * {@inheritDoc} 1192 | * 1193 | *

The default implementation returns the result of calling 1194 | * {@link #visitChildren} on {@code ctx}.

1195 | */ 1196 | @Override public T visitBaseType(vbaParser.BaseTypeContext ctx) { return visitChildren(ctx); } 1197 | /** 1198 | * {@inheritDoc} 1199 | * 1200 | *

The default implementation returns the result of calling 1201 | * {@link #visitChildren} on {@code ctx}.

1202 | */ 1203 | @Override public T visitCertainIdentifier(vbaParser.CertainIdentifierContext ctx) { return visitChildren(ctx); } 1204 | /** 1205 | * {@inheritDoc} 1206 | * 1207 | *

The default implementation returns the result of calling 1208 | * {@link #visitChildren} on {@code ctx}.

1209 | */ 1210 | @Override public T visitComparisonOperator(vbaParser.ComparisonOperatorContext ctx) { return visitChildren(ctx); } 1211 | /** 1212 | * {@inheritDoc} 1213 | * 1214 | *

The default implementation returns the result of calling 1215 | * {@link #visitChildren} on {@code ctx}.

1216 | */ 1217 | @Override public T visitComplexType(vbaParser.ComplexTypeContext ctx) { return visitChildren(ctx); } 1218 | /** 1219 | * {@inheritDoc} 1220 | * 1221 | *

The default implementation returns the result of calling 1222 | * {@link #visitChildren} on {@code ctx}.

1223 | */ 1224 | @Override public T visitFieldLength(vbaParser.FieldLengthContext ctx) { return visitChildren(ctx); } 1225 | /** 1226 | * {@inheritDoc} 1227 | * 1228 | *

The default implementation returns the result of calling 1229 | * {@link #visitChildren} on {@code ctx}.

1230 | */ 1231 | @Override public T visitLetterrange(vbaParser.LetterrangeContext ctx) { return visitChildren(ctx); } 1232 | /** 1233 | * {@inheritDoc} 1234 | * 1235 | *

The default implementation returns the result of calling 1236 | * {@link #visitChildren} on {@code ctx}.

1237 | */ 1238 | @Override public T visitLineLabel(vbaParser.LineLabelContext ctx) { return visitChildren(ctx); } 1239 | /** 1240 | * {@inheritDoc} 1241 | * 1242 | *

The default implementation returns the result of calling 1243 | * {@link #visitChildren} on {@code ctx}.

1244 | */ 1245 | @Override public T visitLiteral(vbaParser.LiteralContext ctx) { return visitChildren(ctx); } 1246 | /** 1247 | * {@inheritDoc} 1248 | * 1249 | *

The default implementation returns the result of calling 1250 | * {@link #visitChildren} on {@code ctx}.

1251 | */ 1252 | @Override public T visitType(vbaParser.TypeContext ctx) { return visitChildren(ctx); } 1253 | /** 1254 | * {@inheritDoc} 1255 | * 1256 | *

The default implementation returns the result of calling 1257 | * {@link #visitChildren} on {@code ctx}.

1258 | */ 1259 | @Override public T visitTypeHint(vbaParser.TypeHintContext ctx) { return visitChildren(ctx); } 1260 | /** 1261 | * {@inheritDoc} 1262 | * 1263 | *

The default implementation returns the result of calling 1264 | * {@link #visitChildren} on {@code ctx}.

1265 | */ 1266 | @Override public T visitVisibility(vbaParser.VisibilityContext ctx) { return visitChildren(ctx); } 1267 | /** 1268 | * {@inheritDoc} 1269 | * 1270 | *

The default implementation returns the result of calling 1271 | * {@link #visitChildren} on {@code ctx}.

1272 | */ 1273 | @Override public T visitAmbiguousKeyword(vbaParser.AmbiguousKeywordContext ctx) { return visitChildren(ctx); } 1274 | /** 1275 | * {@inheritDoc} 1276 | * 1277 | *

The default implementation returns the result of calling 1278 | * {@link #visitChildren} on {@code ctx}.

1279 | */ 1280 | @Override public T visitRemComment(vbaParser.RemCommentContext ctx) { return visitChildren(ctx); } 1281 | /** 1282 | * {@inheritDoc} 1283 | * 1284 | *

The default implementation returns the result of calling 1285 | * {@link #visitChildren} on {@code ctx}.

1286 | */ 1287 | @Override public T visitComment(vbaParser.CommentContext ctx) { return visitChildren(ctx); } 1288 | /** 1289 | * {@inheritDoc} 1290 | * 1291 | *

The default implementation returns the result of calling 1292 | * {@link #visitChildren} on {@code ctx}.

1293 | */ 1294 | @Override public T visitEndOfLine(vbaParser.EndOfLineContext ctx) { return visitChildren(ctx); } 1295 | /** 1296 | * {@inheritDoc} 1297 | * 1298 | *

The default implementation returns the result of calling 1299 | * {@link #visitChildren} on {@code ctx}.

1300 | */ 1301 | @Override public T visitEndOfStatement(vbaParser.EndOfStatementContext ctx) { return visitChildren(ctx); } 1302 | } --------------------------------------------------------------------------------