diff --git a/smali/src/main/java/org/jf/smali/main.java b/smali/src/main/java/org/jf/smali/main.java
index 6422525..dd895a1 100644
--- a/smali/src/main/java/org/jf/smali/main.java
+++ b/smali/src/main/java/org/jf/smali/main.java
@@ -103,6 +103,7 @@
         boolean fixGoto = true;
         boolean verboseErrors = false;
         boolean oldLexer = false;
+        boolean printTokens = false;
 
         String outputDexFile = "out.dex";
         String dumpFileName = null;
@@ -149,6 +150,9 @@
                 case 'L':
                     oldLexer = true;
                     break;
+                case 'T':
+                    printTokens = true;
+                    break;
                 default:
                     assert false;
             }
@@ -181,7 +185,7 @@
             boolean errors = false;
 
             for (File file: filesToProcess) {
-                if (!assembleSmaliFile(file, dexFile, verboseErrors, oldLexer)) {
+                if (!assembleSmaliFile(file, dexFile, verboseErrors, oldLexer, printTokens)) {
                     errors = true;
                 }
             }
@@ -257,7 +261,8 @@
         }
     }
 
-    private static boolean assembleSmaliFile(File smaliFile, DexFile dexFile, boolean verboseErrors, boolean oldLexer)
+    private static boolean assembleSmaliFile(File smaliFile, DexFile dexFile, boolean verboseErrors, boolean oldLexer,
+                                             boolean printTokens)
             throws Exception {
         CommonTokenStream tokens;
 
@@ -280,6 +285,19 @@
             tokens = new CommonTokenStream((TokenSource)lexer);
         }
 
+        if (printTokens) {
+            tokens.getTokens();
+            
+            for (int i=0; i<tokens.size(); i++) {
+                Token token = tokens.get(i);
+                if (token.getChannel() == smaliLexer.HIDDEN) {
+                    continue;
+                }
+
+                System.out.println(smaliParser.tokenNames[token.getType()] + ": " + token.getText());
+            }
+        }
+
         smaliParser parser = new smaliParser(tokens);
         parser.setVerboseErrors(verboseErrors);
 
@@ -382,6 +400,9 @@
                 .withDescription("Use the old lexer")
                 .create("L");
 
+        Option printTokensOption = OptionBuilder.withLongOpt("print-tokens")
+                .withDescription("Print the name and text of each token")
+                .create("T");
 
         basicOptions.addOption(versionOption);
         basicOptions.addOption(helpOption);
@@ -393,6 +414,7 @@
         debugOptions.addOption(noFixGotoOption);
         debugOptions.addOption(verboseErrorsOption);
         debugOptions.addOption(oldLexerOption);
+        debugOptions.addOption(printTokensOption);
 
         for (Object option: basicOptions.getOptions()) {
             options.addOption((Option)option);
