Commit Graph

15 Commits (LSLKeyTest)

Author SHA1 Message Date
Diva Canto ab12a14279 Pushed AssemblyVersion up to VersionInfo, so that we don't need to do global replace anymore. 2016-02-21 11:14:02 -08:00
Diva Canto 59b63b6406 On to 0.8.3!
Conflicts:
	OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/Properties/AssemblyInfo.cs
2015-10-18 21:51:49 -07:00
Diva Canto da32512ea4 Updated all occurrences of AssemblyVersion("0.8.1.*") to AssemblyVersion("0.8.2.*") 2015-04-29 18:47:17 -07:00
Aleric Inglewood c90b986d8b Improved line map heuristics.
If the C# column can't be found in the positionMap (but the line can),
use the map immediately after it while correcting for the offset,
unless that results in an LSL position before the previous LSL position
in the positionMap.

The idea behind this heuristic is that in most, if not all cases C#
consumes more characters than LSL (for example LSL_Types.LSLInteger
instead of just 'integer').

Thus if the distance between the columns of two markers differ in
the C# and LSL file, the distance in the C# file will be larger.
Moreover, we can assume that every time this happens we will have
a marker at the beginning of the longer 'keyword', because those
keywords were generated by us in the first place.

For example:

C#:     LSL_Types.LSLInteger f2(LSL_Types.LSLString s)
        ^                       ^
        1                       2

will always have markers at the beginning of the long keywords
'LSL_Types.LSLInteger' and 'LSL_Types.LSLString'.
If an error is generated in between (for example at the beginning
of the function name 'f2') then the correct position is found
by using an offset relative to 2 rather than 1.

Note that a case where this isn't working correctly is
when the user adds extra spaces. For example:

LSL:   integer f2(    string s)

would still use the start of 'string' as reference and
then go backwards 3 characters only because the corresponding
C# still looks like

C#:     LSL_Types.LSLInteger f2(LSL_Types.LSLString s)
                             ^  ^
			     only 3 chars difference

and the reported error at 'f2' would be here:

LSL:   integer f2(    string s)
                   ^

This can only be fixed by generating a mapping for 'f2' itself, or
generating a mapping whenever the amount of spaces is changed.
2014-06-19 23:52:51 +01:00
Aleric Inglewood 3fe9c7c49d Fix looking up line number and colum when there is no exact match.
When a compile error reports a colum/error that is not an exact
match in the positionMap dictionary, the last position in the
map with a line number and position before the reported error
should be returned.

The old code had the following problems:
1) It returns l,c - which are line and column of the C# file, not LSL.
2) It doesn't set l to 'line' when the map has an entry with 'line'.
3) It sorts the map without taking columns into account, which may
   result in a random order of the columns. With my mono implementation
   the columns were reversed in order.

For example, if the map contains the following lines:

99,5,49,10
100,30,50,10
100,40,1,0
101,5,51,10

and a translation of 100,35 was requested,
then the old code would compare '100' with the keys in
the first column - setting l to that key while it is
smaller. Hence, l is set to 99.
Then it finds the key 100 and doesn't update l.
Because of the reversed sort order, it first compares
the column 35 with 40, finding that it is smaller
and therefore it stops; returning 99,1 instead of finding
the correct 100,30 entry and returning 50,10.

This patch causes 50,10 to be returned.

The remaining problems after this patch are:
1) The sorting might not be necessary at all.
2) The is code duplication (I fixed both instances,
   but really there should be no code duplication
   imho).
2014-06-19 23:52:51 +01:00
Justin Clark-Casey (justincc) 5450b1b024 Change assembly versions to 0.8.1 2014-06-17 18:37:15 +01:00
Justin Clark-Casey (justincc) 42bdf44658 Bump OPenSimulator version and assembly versions up to 0.8.0 Dev 2013-10-04 23:33:47 +01:00
Diva Canto 4779f7d7d5 Deleted all AssemblyFileVersion directives 2013-02-19 17:14:55 -08:00
Justin Clark-Casey (justincc) 1f1da23097 Bump version and assembly version numbers from 0.7.5 to 0.7.6
This is mostly Bluewall's work but I am also bumping the general version number
OpenSimulator 0.7.5 remains in the release candidate stage.
I'm doing this because master is significantly adding things that will not be in 0.7.5
This update should not cause issues with existing external binary DLLs because our DLLs do not have strong names
and so the exact version match requirement is not in force.
2013-02-05 00:23:17 +00:00
Diva Canto df62d113ab The last few AssemblyInfos. Finished! 2012-11-14 21:18:18 -08:00
Justin Clark-Casey (justincc) 916e3bf886 Where possible, use the system Encoding.ASCII and Encoding.UTF8 rather than constructing fresh copies.
The encodings are thread-safe and already used in such a manner in other places.
This isn't done where Byte Order Mark output is suppressed, since Encoding.UTF8 is constructed to output the BOM.
2012-07-11 22:54:22 +01:00
Justin Clark-Casey (justincc) 73dcbbd57a minor: remove some mono compiler warnings 2009-11-24 17:32:14 +00:00
Jeff Ames f00126dc2d Add copyright header. Formatting cleanup. 2009-09-29 08:32:59 +09:00
Diva Canto 8f133cb46b Renamed the project lslc to OpenSim.Tools.lslc to conform to the naming conventions so far. Added copyright to it. 2009-09-18 19:28:58 -07:00
Alan M Webb d4c98ddffc This fix adds a stand-alone compilation environment
for OpenSIm scripts. It makes it very easy to address
  coding issues before going in-world to try a script
  out. This is a HUGE time saver if you're doing
  anything significant with scripts.

Signed-off-by: dr scofield (aka dirk husemann) <drscofield@xyzzyxyzzy.net>
2009-09-16 16:43:51 +02:00