I will have no issues with the naming conventions.  I do not as of yet have
occasion to use the Expression Evaluator but will forward any bugs found
when I do have a reason to use the product.

Kevin

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jaroslaw
Kowalski
Sent: Saturday, December 13, 2003 4:53 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]; Ian MacLean; Gert Driesen; Scott
Hernandez
Subject: [Nant-users] Property and function names

Hi!

Quick Summary: This message discusses changes that are going to be made to
NAnt, which may break your build files in future releases. Before we make
it, we'd like to hear your opinion on the subject

As you may know, there's an ongoing effort to implement expression evaluator
for NAnt. We'll be supporting expressions in all places where property
expansion is supported now. We'll use the same tag: ${...} for both property
expansion and embedded expressions.

Recently, we've discussed various naming conventions for properties and
functions. I'd like to present you with the results, expecting to hear your
opinion.

Please let us know if the proposed changes to naming conventions would break
any of your existing build scripts.

Scroll to the end of this message for instruction for downloading a test
release of NAnt with expression evaluator.

Jarek

PROPERTY NAMES:
===============

<rationale>
Currently, NAnt imposes no restrictions on property names. Basically any
string can be a property name: "[EMAIL PROTECTED](*&[EMAIL PROTECTED]", "12345" or 
even "+,-,*,/".
This may cause problems with expression evaluator, so we've decided to
formalize the naming conventions.
</rationale>

<definition>

A valid property name is a sequence of the following characters:

    letters 'A' through 'Z' (uppercase or lowercase)
    digits '0' through '9'
    '_'(underscore)
    '.' (dot)
    '-' (dash or minus)

The property name must start with a letter or an underscore and must end
with a letter, underscore or digit.

</definition>

<examples>
The following would be legal property names:

propertyname
property.name.with.dots
property-name-with-dashes
property.name-with.both-dots.and-dashes
__property__
property1
property1.0
property2.0.0
_property-2-1__
property-1-name_
property-1.0-name

The following property names would be ILLEGAL:

[EMAIL PROTECTED]@$!@ (contains illegal characters)
.aaaaa (starts with a dot)
-aaaaa (starts with a dash)
1aaaaa (starts with a digit)
aaaaa.aaa.a.a.a.a- (ends with a dash)
aaaaa.aaa.a.a.a.a. (ends with a dot)
</examples>

FUNCTION NAMES:
===============

<rationale>
We need to formally define function names so that they are clean, readable,
maintainable and allow for future expansion. We've decided to follow XPath
style of naming functions. Additionally we've introduced the concept of
prefixes (namespaces) so that similar functions can be groupped by category.
</rationale>

<definition>
Names of all functions available in expression evaluator will have the
following form:

prefix::function-name-with-dashes-to-separate-words()

The prefix is a sequence of the following characters:

    letters (a-z - lowercase only)
    digits (0-9)

The prefix must start with a letter.

"function-name-with-dashes-to-separate-words" is a sequence of the following
characters:

    letters (a-z - lowercase only)
    digits '0' through '9'
    '-' (dash)

Function name must start with a letter and must not end with a dash.

Prefix and function name are separated by a double colon operator "::".
</definition>

<examples>
The following function names are LEGAL:

string::starts-with()
cvs::get-file-revision()
nant::property-exists()
file::exists()
directory::exists()
office2000::get-msword-path()
linux::is-kernel-2-6()

The following would be ILLEGAL function names:

AAAA::aaaa() (prefix must be lowercase)
1aaaa::bbb() (prefix must not start with a digit)
aaaa::BBB-() (function name must not end with a dash)
aaaa::0123aaaBBB() (function name must not start with a digit)
aaaa::-aaaa()(function name must not start with a dash)
linux::is-kernel-2.6() (contains disallowed character)
linux::is-kernel-2_6() (contains disallowed character)
</examples>

HOW TO GET IT:
==============

There's a test release of NAnt with expression evaluator support available
at:

http://jaak.sav.net/nant-ee/nant-ee-test4.zip (built with .NET 1.1)

The code is in CVS in branch "EE-patches" so you may try to compile.

You are encouraged to try to use it on your build files to see if they don't
break.

The ZIP contains preliminary user documentation for functions
(doc/help/functions.html), so you can see what is going to be available.

There's a command line option to disable expression evaluator. Use it if you
have problems and send us the bug report.

If you like screenshots and VIM is your favourite editor, look at the
upcoming feature:

http://jaak.sav.net/nant-ee/vim-screenshot.gif



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
Nant-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-users



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
Nant-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to