Ticket #1408 (closed enhancement: fixed)

Opened 15 years ago

Last modified 14 years ago

Erlang syntax file

Reported by: baryluk Owned by: slyfox
Priority: major Milestone: 4.7.0-pre2
Component: mcedit Version: master
Keywords: commited-master Cc:
Blocked By: Blocking:
Branch state: Votes for changeset: iNode slyfox

Description (last modified by slyfox) (diff)

Hi, i created Erlang syntax file about 2 weeks ago, and was testing it since then. It looks quite good (but few minor syntax forms are not implemented yet, see comments in file). So considering that is is far better than nothing and actually it works, I will ask for inclusion in master branch.

Most actuall version:

http://smp.if.uj.edu.pl/~baryluk/erlang.syntax

Syntax entries:

file ..\*\\.erl$ Erlang\sProgram  ^(-module\\(|#!.*escript)
include erlang.syntax

file ..\*\\.hrl$ Erlang\sHeader ^-record\(
include erlang.syntax

Merged as changeset:d3f1b16bcf17f5748d6faa2d3ca157de22d910ae
Take 2 merged as changeset:0cfde89dade215bcfde2ee7667e83dc0ba83a30d

Attachments

erlang.syntax (7.9 KB) - added by baryluk 15 years ago.
erlang-samples.tar.gz (155.1 KB) - added by baryluk 15 years ago.
erlang.2.syntax (9.1 KB) - added by baryluk 15 years ago.
New erlang syntax file (with escape sequenced in strings and atom, few dict:* functions added)

Change History

Changed 15 years ago by baryluk

comment:1 Changed 15 years ago by baryluk

  • Version changed from 4.6.2 to master

comment:2 Changed 15 years ago by slavazanko

  • Milestone changed from 4.7 to 4.7.0-pre2

patch simply: no reason for wait 4.7 release.

4.7.0-pre1 now frozen for new features - just fixing critical bugs.


This for 4.7.0-pre2.

comment:3 Changed 15 years ago by styx

  • Owner set to styx
  • Status changed from new to accepted
  • Votes for changeset set to vote-styx

Branch: 1408_erlang_syn_hl
Changeset: 05d729b22f58de1af74359612958355e74af019d

comment:4 Changed 15 years ago by styx

  • severity changed from no branch to on review

comment:5 Changed 15 years ago by angel_il

  • Votes for changeset changed from vote-styx to styx angel_il

but wait before pre1 released

comment:6 Changed 15 years ago by styx

  • severity changed from on review to approved

comment:7 Changed 15 years ago by styx

  • Status changed from accepted to testing
  • Resolution set to fixed
  • severity changed from approved to merged

comment:8 Changed 15 years ago by styx

  • Status changed from testing to closed

comment:9 Changed 15 years ago by slyfox

  • Description modified (diff)

comment:10 Changed 15 years ago by slyfox

  • Description modified (diff)

comment:11 follow-up: ↓ 12 Changed 15 years ago by baryluk

I think, there is missing backslash (after record).

It sould be:

file ..\*\\.erl$ Erlang\sProgram  ^(-module\\(|#!.*escript)
include erlang.syntax

file ..\*\\.hrl$ Erlang\sHeader ^-record\\(
include erlang.syntax

comment:12 in reply to: ↑ 11 Changed 15 years ago by slyfox

  • Status changed from closed to reopened
  • Resolution fixed deleted

Replying to baryluk:

I think, there is missing backslash (after record).

It sould be:

file ..\*\\.erl$ Erlang\sProgram  ^(-module\\(|#!.*escript)
include erlang.syntax

file ..\*\\.hrl$ Erlang\sHeader ^-record\\(
include erlang.syntax

Can You provide some erlang samples in tarball and patch on top of current git master?

comment:13 Changed 15 years ago by baryluk

This are pretty hard samples (big and lots of syntax used).

Problems notices:

xmerl_sax_parser_utf8.erl starting at line 1294, "\"" sequence (escaped " in string).
xmerl_scan.erl starting at line 2305, also "\"" sequence

I have fix prepared (copied from C and D syntax hightling files), but need to look at erlang specification to be sure which escape sequences are allowed.

Changed 15 years ago by baryluk

comment:14 follow-up: ↓ 15 Changed 15 years ago by baryluk

Ok, new version attached as erlang.2.syntax.
Based on http://www.erlang.org/doc/reference_manual/data_types.html#2.14 and D syntax file.

file escape.erl in erlang-samples.tar.gz shows now that it works. xmerl_* samples also now works properly.

Changed 15 years ago by baryluk

New erlang syntax file (with escape sequenced in strings and atom, few dict:* functions added)

comment:15 in reply to: ↑ 14 Changed 15 years ago by slyfox

  • Votes for changeset styx angel_il deleted
  • severity changed from merged to on review

Replying to baryluk:

Ok, new version attached as erlang.2.syntax.
Based on http://www.erlang.org/doc/reference_manual/data_types.html#2.14 and D syntax file.

file escape.erl in erlang-samples.tar.gz shows now that it works. xmerl_* samples also now works properly.

Thanks!
Patch is available as changeset:7f9f5d41972610c5f64656f40ff6c3df5f75ec29
it sits in branch:1408_erlang_fixes.

Please review.

comment:16 Changed 15 years ago by iNode

  • Votes for changeset set to iNode

comment:17 Changed 15 years ago by slyfox

  • Status changed from reopened to accepted
  • Owner changed from styx to slyfox
  • Votes for changeset changed from iNode to iNode slyfox approved

comment:18 Changed 15 years ago by slyfox

  • Keywords commited-master added
  • Status changed from accepted to testing
  • Resolution set to fixed
  • Description modified (diff)
  • severity changed from on review to merged

comment:19 Changed 15 years ago by styx

  • Status changed from testing to closed
  • Votes for changeset changed from iNode slyfox approved to iNode slyfox
Note: See TracTickets for help on using tickets.