Effective October 27, 2012, online and email support for FuseSource products will move to Red Hat support channels. For more information, please see the JIRA Migration to Red Hat FAQ.
As of October 27th, please open all new issues in the Red Hat Customer Portal .
Issue Details (XML | Word | Printable)

Key: SCALATE-11
Type: Improvement Improvement
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Hiram Chirino
Reporter: Hiram Chirino
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Forge: Scalate

Use a scala combinator parser to parse the ssp files

Created: 01/Feb/10 03:26 AM   Updated: 01/Feb/10 06:16 PM
Component/s: scalate-core
Affects Version/s: 1.0
Fix Version/s: 1.0


 Description  « Hide
using a combinator parser should make it simpler to maintain.

 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
James Strachan added a comment - 01/Feb/10 10:03 AM - edited
BTW one idea I had was, once we had a scala combinator parser; it'd be easy to add a parser for open & close tags. Once we had that, we could maybe implement 'custom tags using XML markup'.

e.g. we could let folks do stuff like this - but without requiring XML syntax (though using a purely XML based template engine would make stuff like this loads easier to implement...)

<html xmlns:f="scala:com.foo.acme.MyTags">
 ...
  <f:cheese blah="123" dynamicExample={some.foo(123)}">
   ...
  </f:cheese>
</html>

which would just be syntax sugar for

<html>
  <% import com.foo.acme.MyTags._ %>
...
  <%= cheese(blah="123", dynamicExample=some.foo(123)) { %>
   ...
  <% } %>
</html>

i.e. for every open/close tag we could look to see if its namespace starts with "scala:" and if so, transform it into a method call + open block or close block etc

Its not a huge biggie - but some folks might like to hide 'tags' behind XML markup tags which are a little less brittle when folks mess with templates in tools etc


Hiram Chirino added a comment - 01/Feb/10 06:16 PM
ssp files are now being parsed with combinator parsers.