mirror of
https://github.com/revanced/smali.git
synced 2025-05-03 16:14:29 +02:00
Added single line comments that start with a ;
git-svn-id: https://smali.googlecode.com/svn/trunk@10 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
This commit is contained in:
parent
becf535a32
commit
bf29ac12eb
@ -1,13 +1,13 @@
|
||||
/*
|
||||
* The number, string and character constant lexical rules are derived from rules
|
||||
* from the Java 1.6 grammar which can be found here:
|
||||
* The comment, number, string and character constant lexical rules are
|
||||
derived from rules from the Java 1.6 grammar which can be found here:
|
||||
* http://openjdk.java.net/projects/compiler-grammar/antlrworks/Java.g
|
||||
*
|
||||
* Specifically, these rules:
|
||||
*
|
||||
* STRING_LITERAL, ESCAPE_SEQUENCE, HEX_DIGITS, HEX_DIGIT, INTEGER_LITERAL,
|
||||
* HEX_PREFIX, LONG_LITERAL, FLOATING_POINT_NUMBER, DECIMAL_EXPONENT,
|
||||
* HEX_EXPONENT, FLOAT_LITERAL, DOUBLE_LITERAL, CHAR_LITERAL
|
||||
* HEX_EXPONENT, FLOAT_LITERAL, DOUBLE_LITERAL, CHAR_LITERAL, LINE_COMMENT
|
||||
*
|
||||
* These rules were originally copyrighted by Terence Parr, and are used here in
|
||||
* accordance with the following license
|
||||
@ -747,3 +747,9 @@ fragment WS
|
||||
|
||||
WHITE_SPACE
|
||||
: (' '|'\t'|'\n'|'\r')+ {$channel = HIDDEN;};
|
||||
|
||||
|
||||
LINE_COMMENT
|
||||
: (';' ~('\n'|'\r')* ('\r\n' | '\r' | '\n')
|
||||
| ';' ~('\n'|'\r')*)
|
||||
{$channel = HIDDEN;};
|
||||
|
@ -6,11 +6,22 @@
|
||||
|
||||
.field private static helloWorldStatic2 Ljava/lang/String; = "Static Initializer Hello World!"
|
||||
|
||||
.method static constructor <clinit>()V
|
||||
|
||||
;This class should display the following text to the screen:
|
||||
;
|
||||
;Hello World!
|
||||
;Static Hello World!
|
||||
;Static Initializer Hello World!
|
||||
;org/JesusFreke/HelloWorld2/HelloWorld2
|
||||
;[Lorg/JesusFreke/HelloWorld2/HelloWorld2;
|
||||
;[I
|
||||
|
||||
|
||||
.method static constructor <clinit>()V ;test
|
||||
.registers 1
|
||||
|
||||
const-string v0, "Static Hello World!"
|
||||
sput-object v0, org/JesusFreke/HelloWorld2/HelloWorld2/helloWorldStatic Ljava/lang/String;
|
||||
sput-object v0, org/JesusFreke/HelloWorld2/HelloWorld2/helloWorldStatic Ljava/lang/String; ;test
|
||||
|
||||
return-void
|
||||
.end method
|
||||
@ -20,7 +31,7 @@
|
||||
invoke-direct {v1}, android/app/Activity/<init>()V
|
||||
|
||||
const-string v0, "Hello World!"
|
||||
iput-object v0, v1, org/JesusFreke/HelloWorld2/HelloWorld2/helloWorld Ljava/lang/String;
|
||||
iput-object v0, v1, org/JesusFreke/HelloWorld2/HelloWorld2/helloWorld Ljava/lang/String;;test
|
||||
|
||||
return-void
|
||||
.end method
|
||||
|
Loading…
x
Reference in New Issue
Block a user