JesusFreke@JesusFreke.com
e80e6a7eb7
Added tests for format 21h
...
git-svn-id: https://smali.googlecode.com/svn/trunk@110 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-06-06 22:37:31 +00:00
JesusFreke@JesusFreke.com
8eb97cdedc
Added tests for format 21s
...
git-svn-id: https://smali.googlecode.com/svn/trunk@109 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-06-06 22:31:26 +00:00
JesusFreke@JesusFreke.com
a387f058b1
Added tests for format 21t
...
git-svn-id: https://smali.googlecode.com/svn/trunk@108 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-06-06 22:28:37 +00:00
JesusFreke@JesusFreke.com
f532d97b54
Added tests for format 22x
...
git-svn-id: https://smali.googlecode.com/svn/trunk@107 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-06-06 21:44:29 +00:00
JesusFreke@JesusFreke.com
c90c00e136
Updated the goto* tests to test both backward and forward gotos
...
git-svn-id: https://smali.googlecode.com/svn/trunk@106 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-06-06 21:29:41 +00:00
JesusFreke@JesusFreke.com
27b56f85a9
Updated the emit methods to not set the text (causes issues with the rules that rewrite their tokens, like char/string
...
git-svn-id: https://smali.googlecode.com/svn/trunk@105 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-06-06 21:28:06 +00:00
JesusFreke@JesusFreke.com
1e457d8a9e
Fixed issue where the text for character literals with an escape sequence had 2 ending ' characters
...
git-svn-id: https://smali.googlecode.com/svn/trunk@104 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-06-06 21:03:40 +00:00
JesusFreke@JesusFreke.com
88ae58c222
Fixed typo in file name
...
git-svn-id: https://smali.googlecode.com/svn/trunk@103 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-06-06 21:01:20 +00:00
JesusFreke@JesusFreke.com
74f73e382d
Improved error handling
...
git-svn-id: https://smali.googlecode.com/svn/trunk@102 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-06-06 20:45:23 +00:00
JesusFreke@JesusFreke.com
c52343de98
Set the token stream on the tree stream object, so we can use the getSourceName() method to get the current source file
...
git-svn-id: https://smali.googlecode.com/svn/trunk@101 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-06-06 19:22:39 +00:00
JesusFreke@JesusFreke.com
e186646752
Updated the token emmission mechanism to include token line/column info
...
git-svn-id: https://smali.googlecode.com/svn/trunk@100 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-06-06 18:53:40 +00:00
JesusFreke@JesusFreke.com
9cbaa76e44
Added tests for format 30t
...
git-svn-id: https://smali.googlecode.com/svn/trunk@99 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-06-05 06:12:34 +00:00
JesusFreke@JesusFreke.com
5d738c6107
Added tests for format 20t
...
git-svn-id: https://smali.googlecode.com/svn/trunk@98 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-06-05 06:09:42 +00:00
JesusFreke@JesusFreke.com
b617a5f84b
Added tests for format 10t
...
git-svn-id: https://smali.googlecode.com/svn/trunk@97 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-06-05 06:05:26 +00:00
JesusFreke@JesusFreke.com
88ad74f2c2
Added tests for format 11x
...
git-svn-id: https://smali.googlecode.com/svn/trunk@96 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-06-05 05:58:16 +00:00
JesusFreke@JesusFreke.com
6af8f5f476
Added tests for format 11n
...
git-svn-id: https://smali.googlecode.com/svn/trunk@95 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-06-05 05:26:32 +00:00
JesusFreke@JesusFreke.com
b4949abb7b
Fixed the .source name for Format12x.smali
...
git-svn-id: https://smali.googlecode.com/svn/trunk@94 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-06-05 05:22:56 +00:00
JesusFreke@JesusFreke.com
0bc05441fb
- Added tests for all opcodes using format 10x and 12x
...
git-svn-id: https://smali.googlecode.com/svn/trunk@93 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-06-05 05:18:24 +00:00
JesusFreke@JesusFreke.com
2b4a7ca201
- Added an "Assert" helper class to the junit tests, to allow easier testing of various types
...
- Changed the relevent tests to use the new Assert helper
git-svn-id: https://smali.googlecode.com/svn/trunk@92 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-06-05 05:17:23 +00:00
JesusFreke@JesusFreke.com
b03e029611
added an example showing the creation and usage of an interface
...
git-svn-id: https://smali.googlecode.com/svn/trunk@91 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-06-05 05:15:24 +00:00
JesusFreke@JesusFreke.com
0900e0040e
- Added support for specifying a char literal for various types of instruction
...
- Fixed a bug preventing the usage of negative float/double literals
- Fixed escape sequences in character literals
- Added source file name to parser error messages
- Fixed an issue where the parser would exit without an error message, when it encountered a bad "top level" token (in the smali_file rule)
- Fixed an issue that prevented the usage of non long/double literals with the the const-wide instruction
- Fixed an issue with the invoke-static/range, where it wouldn't calculate the number of parameter registers correctly, and would erroneously generate an error message
git-svn-id: https://smali.googlecode.com/svn/trunk@90 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-06-05 05:14:26 +00:00
JesusFreke@JesusFreke.com
5dc3a8d75a
- Added a new "p0" style register reference, where p0 indicates the first parameter register, p1 the 2nd parameter register and so forth. This makes it less annoying when you are writing a method and have to add more registers, which would push the parameter registers back.
...
- Updated the the tests and examples with the new register format, where appropriate
git-svn-id: https://smali.googlecode.com/svn/trunk@89 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-06-04 06:44:10 +00:00
JesusFreke@JesusFreke.com
468e5d0d1b
moved examples
...
git-svn-id: https://smali.googlecode.com/svn/trunk@88 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-06-04 06:27:26 +00:00
JesusFreke@JesusFreke.com
b079ef4c2e
moved examples
...
git-svn-id: https://smali.googlecode.com/svn/trunk@87 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-06-04 06:26:22 +00:00
JesusFreke@JesusFreke.com
3ca2a39dea
Deleted old examples
...
git-svn-id: https://smali.googlecode.com/svn/trunk@86 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-06-04 05:57:24 +00:00
JesusFreke@JesusFreke.com
e69c8af0ef
Fix up how the padding is handled for the special opcodes
...
git-svn-id: https://smali.googlecode.com/svn/trunk@85 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-06-04 05:55:36 +00:00
JesusFreke@JesusFreke.com
9c5bb815a0
removed TODO
...
git-svn-id: https://smali.googlecode.com/svn/trunk@84 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-06-04 05:55:06 +00:00
JesusFreke@JesusFreke.com
1834b365d6
- changed the comment char from ; to #
...
- updated the tests and examples to use the new comment style
- changed the lexer error messages to include the source file path
git-svn-id: https://smali.googlecode.com/svn/trunk@83 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-06-04 05:54:34 +00:00
JesusFreke@JesusFreke.com
e53f5ae41b
rename the AnnotationTypes example
...
git-svn-id: https://smali.googlecode.com/svn/trunk@82 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-06-04 05:02:24 +00:00
JesusFreke@JesusFreke.com
3c0207bddd
re-add the AnnotationTypes example
...
git-svn-id: https://smali.googlecode.com/svn/trunk@81 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-06-04 05:01:55 +00:00
JesusFreke@JesusFreke.com
baf5a9205b
whitespace
...
git-svn-id: https://smali.googlecode.com/svn/trunk@80 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-06-04 04:57:47 +00:00
JesusFreke@JesusFreke.com
c2b3b1457a
moved the examples
...
git-svn-id: https://smali.googlecode.com/svn/trunk@79 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-06-04 04:39:25 +00:00
JesusFreke@JesusFreke.com
20f261138f
Added the junit-tests directory, which contains a junit "Suite" class, and a couple of initial tests
...
git-svn-id: https://smali.googlecode.com/svn/trunk@78 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-06-04 04:25:24 +00:00
JesusFreke@JesusFreke.com
2c5bb6ddf8
Changed how the "UnsupportedEncodingException" is handled
...
git-svn-id: https://smali.googlecode.com/svn/trunk@77 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-06-04 04:18:55 +00:00
JesusFreke@JesusFreke.com
5eb3d80d87
Fix up how the padding is handled for the special opcodes
...
git-svn-id: https://smali.googlecode.com/svn/trunk@76 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-06-04 04:11:09 +00:00
JesusFreke@JesusFreke.com
a7266ebdce
redid .equals() for CachedIntegerValueField
...
git-svn-id: https://smali.googlecode.com/svn/trunk@75 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-06-04 02:48:06 +00:00
JesusFreke@JesusFreke.com
4561355e99
Changed SignedLeb128 for the register fields to Leb128
...
git-svn-id: https://smali.googlecode.com/svn/trunk@74 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-06-04 02:41:26 +00:00
JesusFreke@JesusFreke.com
89063e593b
Removed TODO
...
git-svn-id: https://smali.googlecode.com/svn/trunk@73 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-06-04 02:39:27 +00:00
JesusFreke@JesusFreke.com
608ed0ef87
Removed the old HelloWorld example
...
git-svn-id: https://smali.googlecode.com/svn/trunk@72 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-06-03 07:06:29 +00:00
JesusFreke@JesusFreke.com
d54c635f84
- Added support for enum literals
...
- added "Enums" example, that shows how to construct an enum class
- added an enum value to the AnnotationValues example, to show how enum values are specified in an annotation
git-svn-id: https://smali.googlecode.com/svn/trunk@71 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-06-03 07:05:59 +00:00
JesusFreke@JesusFreke.com
361fa2548e
Removed the debugging output in the lexer that printed out each token
...
git-svn-id: https://smali.googlecode.com/svn/trunk@70 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-06-03 06:09:39 +00:00
JesusFreke@JesusFreke.com
bd85442b25
Added a junit4 dependency to the Maven pom
...
git-svn-id: https://smali.googlecode.com/svn/trunk@69 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-06-03 05:10:27 +00:00
JesusFreke@JesusFreke.com
dbfce409d4
Added the "RecursiveAnnotation" example, which shows a humerous example of an annotation that references itself recursively, causing a stack overflow.
...
git-svn-id: https://smali.googlecode.com/svn/trunk@68 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-06-03 05:08:58 +00:00
JesusFreke@JesusFreke.com
cf396faa1a
Added the "AnnotationTypes" example, which gives some examples of how to create and retrieve the various types of annotations (class, method, field, parameter)
...
git-svn-id: https://smali.googlecode.com/svn/trunk@67 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-06-03 05:05:52 +00:00
JesusFreke@JesusFreke.com
e391894f1b
Added the "AnnotationValues" example, that gives some examples of how to specify values in an annotation
...
git-svn-id: https://smali.googlecode.com/svn/trunk@66 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-06-03 05:03:11 +00:00
JesusFreke@JesusFreke.com
302f64499a
Fixed up the HelloWorld example to use the new field and member syntax
...
git-svn-id: https://smali.googlecode.com/svn/trunk@65 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-06-03 04:59:59 +00:00
JesusFreke@JesusFreke.com
4250768620
- made the .registers directive optional. it defaults to .registers 0 if not present
...
- added logic to avoid creating an empty code_item (i.e. for abstract methods)
- changed the field and parameter syntax so that there is a colon instead of a whitespace between the field/local name and the following type
- changed the member name syntax, so that the initial class is specified with the preceeding 'L' and folling ';', and changed the seperator between the class name and the member name to '->' instead of just another '/'
- added the ability to specify members and fields as constants for static fields or annotations (note: dalvik doesn't seem to like embedded field references)
- fixed the short and byte literals in the parser (they were mistakenly using the _EMIT token)
- fixed an issue with char literals where the value was always a single quote
- renamed the CLASS_OR_ARRAY_TYPE_DESCRIPTOR token and related rules to REFERENCE_TYPE_DESCRIPTOR
- renamed the FIELD_TYPE_DESCRIPTOR token and related rules to NONVOID_TYPE_DESCRIPTOR
git-svn-id: https://smali.googlecode.com/svn/trunk@64 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-06-03 04:58:54 +00:00
JesusFreke@JesusFreke.com
5cf0028e73
fixed the name of the "field name" field, used for dumping
...
git-svn-id: https://smali.googlecode.com/svn/trunk@63 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-06-03 04:47:30 +00:00
JesusFreke@JesusFreke.com
63098c01c4
- fix the getValueArg() calculation for several types of encoded value sub fields
...
- change the placement logic in encoded value to get the value arg from the sub field's getValueArg(), instead of calculating it itself
- fixed FloatEncodedValueSubField's getValueType() to return VALUE_FLOAT instead of VALUE_LONG
git-svn-id: https://smali.googlecode.com/svn/trunk@62 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-06-03 04:45:59 +00:00
JesusFreke@JesusFreke.com
c7a1ff2452
Sort the individual name/value pairs in an annotation by name
...
git-svn-id: https://smali.googlecode.com/svn/trunk@61 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-06-03 04:42:37 +00:00