Uploaded image for project: 'Forge: Scalate'
  1. Forge: Scalate
  2. SCALATE-11

Use a scala combinator parser to parse the ssp files

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 1.0
    • Fix Version/s: 1.0
    • Component/s: scalate-core
    • Labels:
      None
    • Similar Issues:
      Show 10 results 

      Description

      using a combinator parser should make it simpler to maintain.

        Gliffy Diagrams

          Activity

          Hide
          jastrachan James Strachan added a comment - - 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

          Show
          jastrachan James Strachan added a comment - - 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
          Hide
          chirino Hiram Chirino added a comment -

          ssp files are now being parsed with combinator parsers.

          Show
          chirino Hiram Chirino added a comment - ssp files are now being parsed with combinator parsers.

            People

            • Assignee:
              chirino Hiram Chirino
              Reporter:
              chirino Hiram Chirino
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development