Salt ANTLR parser and Swing render... anyone interested in?

0 votes
asked Sep 3, 2014 in To be sorted by anonymous

Hi,

I have developed an ANTLR parser for the Salt syntax and a tree visitor that can create the equivalent Swing layout, so the image can be rendered using real Swing component. Creole syntax for color etc. is not implemented but with real widget set for rendering this is not relevant IMHO.

Below the example. Anyone think this could be usefull?

En example:

{
{* File | Edit | ... | Help}
  {/ Ticket | Other tab }
  {Ticket no: | "655321" | Date: | "2014-08-23" }
  {#
    Product | Quantity | Price
    USB pen | 1 | 10
    DVD | 2 | 1
  }
  {[New] | [Edit] | [Delete] }
  {Total: | "12.00" }
  {[Save] | [Cancel] }
}

 

You can obtain quickly the PlantUML result, below the result with my renderer.
Some extra space is still missing.

 

http://www.mar9000.org/files/ticket-plantui.png

Let me know.
Bye,
Mar

2 Answers

0 votes
answered Sep 4, 2014 by anonymous
Hi

This sound great.

 

Have you considered Xtext ?
commented Sep 4, 2014 by anonymous
Xtext as far as I know is still at version 3 of ANTLR and has an added value only if you aim to use eclipse to edit your languge, but I don't cause the main reason of this work is to use the new syntax with Sphinx
0 votes
answered Sep 4, 2014 by plantuml (298,440 points)

This is indeed amazing!

You must publish this somewhere (github, sourceforge, anywhere) : this would be very usefull for people.

Tell us when you will be done, we will publish a news about it.

Regards,
 

commented Sep 4, 2014 by anonymous
Ok, I'll do it on github.
This is the plan:
  - an independent Salt grammar able to parse a subset of actual Salt grammar
  - an independet and specialized UI grammar similar to Salt with concept of form and field etc for better rendering
  - the integration with PlantUML

For the last point would be usefull to have last stable version of PlantUML on github. Otherwise I'll upload a copy.
Regards,
Mar
...