Changeset 4efbf24ffad048c8ff32cac5823d1cc60935919e
- Timestamp:
- 03/31/2008 03:41:17 PM
(9 months ago)
- Author:
- Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
- git-committer:
- Giuseppe Bilotta <giuseppe.bilotta@gmail.com> 1207003277 +0200
- git-parent:
[48a9d9c1f0120b1d2d54b29749600fb98d10729a]
- git-author:
- Giuseppe Bilotta <giuseppe.bilotta@gmail.com> 1205573623 +0100
- Message:
add support for metafont and metapost
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r2b58dd4 |
r4efbf24 |
|
| 43 | 43 | lua = CMonoglot.new("lua", '--', nil, true, true) |
|---|
| 44 | 44 | matlab = CMonoglot.new("matlab", '#|%', ['{%', '%}'], false,true) |
|---|
| | 45 | metafont = LineCommentMonoglot.new("metafont", "%"); |
|---|
| | 46 | metapost = LineCommentMonoglot.new("metapost", "%"); |
|---|
| 45 | 47 | objective_c = CMonoglot.new("objective_c", '//', [e('/*'), e('*/')], true, false) |
|---|
| 46 | 48 | pascal = CMonoglot.new("pascal", '//', ['{','}'], true, true, {:no_escape_dquote => true, :no_escape_squote => true}) |
|---|
| … | … | |
| 69 | 71 | dmd = DMonoglot.new('dmd') |
|---|
| 70 | 72 | tex = CMonoglot.new("tex", '%', nil, false, false) |
|---|
| | 73 | metapost_with_tex = Biglot.new('metapost_with_tex', metapost, tex, [], [ |
|---|
| | 74 | ["verbatimtex", :metapost_code, :tex_code, :from, false, 'verbatim'], |
|---|
| | 75 | ["btex", :metapost_code, :tex_code, :from, false, 'btex'], |
|---|
| | 76 | ["etex", :tex_code, :return, :to, false, 'etex'] |
|---|
| | 77 | ]); |
|---|
| 71 | 78 | polyglots = [ |
|---|
| 72 | 79 | ada , |
|---|
| … | … | |
| 93 | 100 | lua , |
|---|
| 94 | 101 | matlab, |
|---|
| | 102 | metafont, |
|---|
| | 103 | metapost, |
|---|
| 95 | 104 | objective_c, |
|---|
| 96 | 105 | pascal , |
|---|
| … | … | |
| 119 | 128 | jsp, |
|---|
| 120 | 129 | clearsilver_template, |
|---|
| 121 | | tex |
|---|
| | 130 | tex, |
|---|
| | 131 | metapost_with_tex |
|---|
| 122 | 132 | ] |
|---|
| 123 | 133 | File.open("polyglots.c", "w") do |io| |
|---|
| rd7e4b3c |
r4efbf24 |
|
| 154 | 154 | '.lisp' => "lisp", |
|---|
| 155 | 155 | '.m' => :matlab_or_objective_c, |
|---|
| | 156 | '.mf' => 'metafont', |
|---|
| 156 | 157 | '.mm' => "objective_c", |
|---|
| | 158 | '.mp' => 'metapost_with_tex', |
|---|
| 157 | 159 | '.pas' => "pascal", |
|---|
| 158 | 160 | '.pp' => "pascal", |
|---|
| rd7e4b3c |
r4efbf24 |
|
| 63 | 63 | 'lua' => {:nice_name => 'Lua' , :category => 0}, |
|---|
| 64 | 64 | 'matlab' => {:nice_name => 'Matlab' , :category => 0}, |
|---|
| | 65 | 'metafont' => {:nice_name => 'MetaFont' , :category => 1}, |
|---|
| | 66 | 'metapost' => {:nice_name => 'MetaPost' , :category => 1}, |
|---|
| 65 | 67 | 'objective_c' => {:nice_name => 'Objective C' , :category => 0}, |
|---|
| 66 | 68 | 'pascal' => {:nice_name => 'Pascal' , :category => 0}, |
|---|