Common Lisp support

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • puchacz
    Visitor
    • Aug 2014
    • 3

    Common Lisp support

    Hi,

    Is there any add-on to compare Lisp (Common Lisp specifically) source files?

    Cheers,
    Piotr
  • Aaron
    Team Scooter
    • Oct 2007
    • 16007

    #2
    Hello,

    We do not have an included text Format for LISP files, but you could define one in our File Formats dialog (new Text Format). You can clone an existing format as a base, or create from scratch.

    For using these elements to define Unimportance, you can follow this guide:
    http://www.scootersoftware.com/suppo..._unimportantv3
    Aaron P Scooter Software

    Comment

    • puchacz
      Visitor
      • Aug 2014
      • 3

      #3
      Hi Aaron,

      Can you give me a specific example please? it is very easy to parse various dialects of Lisp, the rules would be:
      1. strings are delimited by ", with \ being escape char - this one I found in Tools / File formats
      2. something like regex matching letters, digints and few other characters like ! ? - + they all count as atoms
      3. everything between matching ( and ) is a "code/data block"
      4. most importantly and any white characters including line breaks are not important at all


      I realise it is not full definition for Lisp scanner but three rules like this would get us very far, especially the last one about ignoring all whitespaces except for whitespaces in strings.

      Cheers,
      Piotr

      Comment

      • puchacz
        Visitor
        • Aug 2014
        • 3

        #4
        specifically, when I say whitespace does not matter, I would like
        (a b (c d))
        to report no difference when compared against
        (a
        b (c
        d)
        )

        makes sense? structure is the same, like in most applications of XML (where formally whitespace matters, but in most applications it is ignored, this is why you can format and pretty print XML documents)

        Comment

        • Aaron
          Team Scooter
          • Oct 2007
          • 16007

          #5
          Hello,

          Beyond Compare 4 does not currently support across line comparisons. The Text Compare will align side by side with line by line, then those lines can be compared. In the case above with abcd and then lines a, bc, d, it can only align to one pair.

          You could create an external conversion to normalize the whitespace of your files, making it equal, and therefore comparable. We have an example with our HTML Tidy and XML Tidy formats, or also RESX files:
          http://www.scootersoftware.com/suppo...rnalconversion

          As for RegEx examples, do you have any single line examples (left to right) you would like help with?
          Aaron P Scooter Software

          Comment

          Working...