Skip to Content.
Sympa Menu

k-user - Re: [K-user] Syntax Highlighting

k-user AT lists.siebelschool.illinois.edu

Subject: K-user mailing list

List archive

Re: [K-user] Syntax Highlighting


Chronological Thread 
  • From: Traian Florin Șerbănuță <tserban2 AT illinois.edu>
  • To: "Seyed H. HAERI (Hossein)" <hossein.haeri AT gmail.com>
  • Cc: "k-user AT cs.uiuc.edu" <k-user AT cs.uiuc.edu>
  • Subject: Re: [K-user] Syntax Highlighting
  • Date: Fri, 17 Feb 2012 13:08:36 -0600
  • List-archive: <http://lists.cs.uiuc.edu/pipermail/k-user>
  • List-id: <k-user.cs.uiuc.edu>


Sure,

This should be useful for future reference as well.  Maybe we should put this on the wiki or somewhere.
Hope I'm not missing anything, I'm now quoting from the vim syntax file, ignoring things specific to Maude:

file stuff:
  require

module stuff:
  module ... end module     
  imports 

Keywords:

  syntax  --- with  '::='  and '|'
  macro
  context  with 'HOLE'
  configuration with xml cells with attributes 
      <br> might be used here for typeset purposes to break lines
  rule   with '=>' for rewriting, 'when' for side conditions and 'where' for macro substitution
  tags  --- I'm not sure this is still used

to be added soon:  
  declare 
  define

Comments:
  //  for line comments
  //@ for LaTeX line comments
  /* for block comments */  
  /*@ for LaTeX block comments */

K Sorts:
  K with  '~>' and .K
  KLabel these usually are formatted as "quotes ids" which start with a ' and grab everything until the next space, comma or bracket which is not backquoted.
  List{K} with ',,' and .List{K}
  List with ListItem and .List
  Set with SetItem and .Set
  Bag with BagItem and .Bag 
  Map with MapItem .Map 
  CellLabel 
  KResult

Special symbols:
  '_' for anonymous variables

Attributes:
  Strategies
     strict seqstrict hybrid structural transition superheat supercool 
  Typesetting:
    large latex 
    color --- this is a cell attribute
  Other:
    binder
    multiplicity --- this is a cell attribute
 
  Parsing:
     prec gather 

Builtin Sorts:
  #Bool #Int #Float #String #Char #Id
Builtin Constants
  true false 0 1 ... 0.0 0.1 ...  "" 
Builtin Operators
  +Int andBool ==Bool lengthString #id ....

this should give you a pretty good picture.  Hope I didn't left anything out.

best wishes,
- traian

2012/2/17 Seyed H. HAERI (Hossein) <hossein.haeri AT gmail.com>
Hi Traian,

> If you write a syntax highlighter for KDE-based applications, that would be
> much appreciated, and I'll make sure it gets added to the K repository.
>  Thanks for offering to do that!

My pleasure. :) Now, as the starter, can I have the list of K reserved
words please?

TIA,
--Hossein

--------------------------------------------------------------------------------------------------------------

Seyed H. HAERI (Hossein)

Research Assistant
Institute for Software Systems (STS)
Technical University of Hamburg (TUHH)
Hamburg, Germany

ACCU - Professionalism in programming - http://www.accu.org/
--------------------------------------------------------------------------------------------------------------

_______________________________________________
k-user mailing list
k-user AT cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/k-user




Archive powered by MHonArc 2.6.16.

Top of Page