1: /* Cfour (C++ Common Console Classes)
2: * Copyright (C) 2001 Jeffrey Bakker
3: *
4: * This program is free software; you can redistribute it and/or modify
5: * it under the terms of the GNU General Public License as published by
6: * the Free Software Foundation; either version 2 of the License, or
7: * (at your option) any later version.
8: *
9: * This program is distributed in the hope that it will be useful,
10: * but WITHOUT ANY WARRANTY; without even the implied warranty of
11: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12: * GNU General Public License for more details.
13: *
14: * You should have received a copy of the GNU General Public License
15: * along with this program; if not, write to the Free Software
16: * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17: *
18: *
19: * Author: Jeffrey Bakker
20: * Filename: cfdatapair.h
21: * File version: 1.1
22: *
23: * ===========================================================================
24: *
25: * Created on: Sept 2nd, 2001
26: *
27: * Modified on: April 1st, 2002
28: *
29: * - Added translateML() which takes data markup format,
30: * and modifies name and value.
31: * - Added info_ml(), changed info() to info_nv().
32: * - Added a constructor which takes a string in markup format.
33: * - Overloaded insertion and extraction operators to convert
34: * data between pairs and maarkup like a stream call.
35: * - Made getName() and getValue() as const methods.
36: *
37: * ===========================================================================
38: *
39: * Remark:
40: *
41: * This is the class defintion for CFdataPair, a class which provides methods
42: * and data members for storing pairs of data.
43: *
44: * ===========================================================================
45: * _______. ..
46: */
47:
48:
49: #ifndef _C4_DATA_PAIR
50: #define _C4_DATA_PAIR
51:
52: #include <string>
53: using namespace std;
54:
55: class CFdatapair {
56:
57: public:
58:
59: void operator<<(string mldata);//{translateML(mldata);}
60: void operator>>(string& mldata);//{mldata = info_ml();}
61: //---------------------------------------------------------------------------
62: CFdatapair(); // default constructor
63: CFdatapair(string mldata); // create datapair with markup data
64: CFdatapair(string n, string v); // create datapair with name and value
65: //---------------------------------------------------------------------------
66: string getname() const; // return the name
67: string getvalue() const; // return the value
68: void setname (string n); // change the name
69: void setvalue(string v); // change the value
70: //---------------------------------------------------------------------------
71: string info_nv() const; // return the name/value in printable format
72: string info_ml() const; // return the name/value in markup format
73: //---------------------------------------------------------------------------
74: void translateML(string mldata);// change the name/value using markup data
75: void swap(); // swap the name and value
76: //---------------------------------------------------------------------------
77: protected:
78:
79: string name;
80: string value;
81: //---------------------------------------------------------------------------
82: };
83:
84: #endif // _C4_DATA_PAIR
85:
86:
87:
88: /* Cfour (C++ Common Classes Collection)
89: * Copyright (C) 2001, (C) 2002 Jeffrey Bakker
90: *
91: * This program is free software; you can redistribute it and/or modify
92: * it under the terms of the GNU General Public License as published by
93: * the Free Software Foundation; either version 2 of the License, or
94: * (at your option) any later version.
95: *
96: * This program is distributed in the hope that it will be useful,
97: * but WITHOUT ANY WARRANTY; without even the implied warranty of
98: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
99: * GNU General Public License for more details.
100: *
101: * You should have received a copy of the GNU General Public License
102: * along with this program; if not, write to the Free Software
103: * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
104: *
105: *
106: * Author: Jeffrey Bakker
107: * Filename: cffile.h
108: * File version: 1.2.3
109: *
110: * CHANGELOG ==================================================================
111: * ============================================================================
112: *
113: * Created on: August 21st, 2001
114: *
115: *
116: * Modified on: September 2nd, 2001
117: *
118: * - Added a new read(), rline(), and write() methods for reading
119: * and writing to and from a file.
120: *
121: * Modified on: November 7th, 2001
122: *
123: * - Added a new isIredir(), and isOredir(), toggleImode(), and
124: * toggleOmode() methods and booleans data iredir & oredir for
125: * I/O redirection.
126: *
127: * Modified on: November 8th, 2001
128: *
129: * - Overloaded the insertion and extraction operators.
130: * - The read() and write() methods are now template methods.
131: *
132: * Modified on: December 30th, 2001
133: *
134: * - Added void setIFptr(long), void setOFptr (long),
135: * long getIFptr(), and long getOFptr() methods for
136: * get/setting the location of the in/out file pointers.
137: * - Added CFfile::READ and CFfile::WRITE constants to send
138: * as file modes to the constructor and open method.
139: *
140: * Modified on: March 30th, 2002
141: *
142: * - Extraction and insertion operator now return CFfile&, for
143: * concatenating multiple stream commands into a single call
144: * to the stream object. eg. IO << "this" << that << 2 << 'y';
145: * - Added rfile() method, which reads the contents of the
146: * currently open input file into a string.
147: * - Defined ENDL and DOSENDL as "\n" and "\r\n".
148: *
149: * Modified on: March 31st, 2002
150: *
151: * - Added an overloaded openW() method, which takes a bool
152: * parameter for overwriting or aborting on existing files.
153: * - Redone read() and write() using the conditional operator
154: * rather than using if/else.
155: * - Replaced read/write mode constants with #defines, and
156: * added more modes.
157: * - All templated methods are now implemented in the header
158: * file to fix unresolved symbols when linking with the
159: * microsoft compiler.
160: *
161: * Modified on: April 12th, 2002
162: *
163: * - Improved and added more whitespace defines, and set the file
164: * open method defines to Hex format.
165: * - The read() and write() methods now use positive logic.
166: *
167: * Modified on: April 30th, 2002
168: *
169: * - Added members bool oopen, iopen, bool isOopen(), and
170: * bool isIopen() to check if the file streams are in use.
171: *
172: * ============================================================================
173: * ============================================================================
174: *
175: * Remark:
176: *
177: * This is the definition of the CFfile class. The CFfile class contains file
178: * I/O methods which automates file checking while opening I/O streams. You
179: * can now safely open and close files, error free.
180: *
181: * The extraction and insertion operators have been overloaded, in an attempt
182: * to turn this class into a stream class which wraps the fstream and the
183: * iostream classes nicely and conveniently together.
184: *
185: * The class has also been designed to easily switch between file I/O to
186: * STDIN/STDOUT, enabling the ability to write programs which provide the
187: * "piping" functionality from the command line.
188: *
189: * For specific details on the methods, see the documentation at the top of
190: * the file "cffile.cpp".
191: *
192: * ============================================================================
193: * _______. ..
194: */
195:
196:
197: #ifndef _C4_FILE_H
198: #define _C4_FILE_H
199:
200: #define C4_FILE_VER "1.2.3"
201:
202:
203: // whitespace defines ----------------------------------------------------------
204: #if defined(WIN32)
205: #define ENDL "\r\n"
206: #elif defined(UNIX)
207: #define ENDL "\n"
208: #else // other OS
209: #define ENDL "\n"
210: #endif // defined(WIN32/UNIX)
211:
212: #define NIXENDL "\n"
213: #define DOSENDL "\r\n"
214: #define BIG_TAB "\t\t"
215: #define SPACE_4 " "
216: #define SPACE_8 " "
217:
218: // file open modes ----------
219: #define MODE_READ 0x72
220: #define MODE_WRITE 0x77
221: #define PROMPT_OVERWRITE 0x77
222: #define FORCE_OVERWRITE 0x66
223: #define NEVER_OVERWRITE 0x6B
224: //--------------------------..
225:
226: #include <iostream>
227: #include <fstream>
228: #include <string>
229: using namespace std;
230:
231:
232: class CFfile {
233:
234: public:
235: // (Con/De)structors ---------------------------------------------------------
236: CFfile();
237: CFfile(string filename, char io);
238: CFfile(string filein, string fileout);
239: ~CFfile();
240: // Initialize bool data members ----------------------------------------------
241: void init_switches();
242: //----------------------------------------------------------------------------
243: // Operator overloading ------------------------------------------------------
244: template <class T> CFfile& operator<<(T var) {write(var);return *this;}
245: template <class T> CFfile& operator>>(T& var) {read (var);return *this;}
246: //----------------------------------------------------------------------------
247: // File open methods ---------------------------------------------------------
248: bool exists(string fname); // check if a file exists
249: bool openR(string INfile); // opens file for reading
250: bool openW(string OUTfile); // opens file for writing
251: bool openW(string fn, bool ow); // open, specify overwrite
252: bool open(string fn, char io); // open, specify mode
253:
254: bool isIopen() {return iopen;} // is infile open?
255: bool isOopen() {return oopen;} // is outfile open?
256: //----------------------------------------------------------------------------
257: // File pointer location methods ---------------------------------------------
258: void setIFptr(long location); // set the infile pointer location
259: void setOFptr(long location); // set the outfile pointer location
260: long getIFptr(); // get the infile pointer location
261: long getOFptr(); // get the outfile pointer location
262: //----------------------------------------------------------------------------
263: // I/O redirection methods ---------------------------------------------------
264: bool isIredir() const; // returns the input mode
265: bool isOredir() const; // returns the output mode
266: void toggleImode(); // toggles input mode (FILE or STDIN)
267: void toggleOmode(); // toggles output mode (FILE or STDIN)
268: //----------------------------------------------------------------------------
269: // Read/Write methods --------------------------------------------------------
270: template <class T> void read(T &buffer) {(iredir? cin:ifile) >> buffer;}
271: template <class T> void write(T buffer) {(oredir? cout:ofile) << buffer;}
272: // Special purpose read methods ----------------------------------------------
273: void rline(string &buffer); // read a line to the string
274: void rfile(string &buffer); // read a file to the string
275: void backup(string fname, string bname); // copy a file
276: // File close methods --------------------------------------------------------
277: void closeR(); // close the input file
278: void closeW(); // close the output file
279: void close(); // close all
280: //----------------------------------------------------------------------------
281: // These are public, so you can still use them raw ---------------------------
282: ifstream ifile; // input file stream
283: ofstream ofile; // output file stream
284: //----------------------------------------------------------------------------
285: protected:
286: // I/O redirection switches --------------------------------------------------
287: bool iredir;
288: bool oredir;
289: bool iopen;
290: bool oopen;
291: };
292:
293: #endif // _C4_FILE_H
294:
295: #ifndef _DEFLANGS_H
296: #define _DEFLANGS_H
297:
298: #define ADA_FILE 0x64
299: #define ASM_FILE 0x61
300: #define ASP_FILE 0x41
301: #define BASIC_FILE 0x62
302: #define BATCH_FILE 0x75
303: #define C_FILE 0x63
304: #define CG_FILE 0x67
305: #define CLIPS_FILE 0x6E
306: #define CPP_FILE 0x2B
307: #define CSHARP_FILE 0x23
308: #define EMF_FILE 0x4D
309: #define U4EA_FILE 0x45
310: #define FORTRAN_FILE 0x66
311: #define HASKELL_FILE 0x6B
312: #define HTML_FILE 0x68
313: #define JAVA_FILE 0x6A
314: #define JSCRIPT_FILE 0x78
315: #define MODULA_FILE 0x6D
316: #define OBJC_FILE 0x6F
317: #define PASCAL_FILE 0x6C
318: #define PERL_FILE 0x65
319: #define PHP_FILE 0x70
320: #define PB6_FILE 0x77
321: #define PYTHON_FILE 0x79
322: #define RENDER_FILE 0x52
323: #define RUBY_FILE 0x55
324: #define SHELL_FILE 0x73
325: #define SQL_FILE 0x71
326: #define TCL_FILE 0x72
327: #define TEXT_FILE 0x74
328: #define USCRIPT_FILE 0x54
329: #define VHDL_FILE 0x76
330:
331: #include "langada.h"
332: #include "langasm.h"
333: #include "langasp.h"
334: #include "langbasic.h"
335: #include "langbatch.h"
336: #include "langc.h"
337: #include "langcg.h"
338: #include "langclips.h"
339: #include "langcpp.h"
340: #include "langcsharp.h"
341: #include "langemf.h"
342: #include "langeuphoria.h"
343: #include "langfortran.h"
344: #include "langhaskell.h"
345: #include "langhtml.h"
346: #include "langjava.h"
347: #include "langjscript.h"
348: #include "langmodula.h"
349: #include "langobjc.h"
350: #include "langpascal.h"
351: #include "langperl.h"
352: #include "langphp.h"
353: #include "langpbuilder.h"
354: #include "langpython.h"
355: #include "langrenderman.h"
356: #include "langruby.h"
357: #include "langshell.h"
358: #include "langsql.h"
359: #include "langtcl.h"
360: #include "langtext.h"
361: #include "languscript.h"
362: #include "langvhdl.h"
363:
364: #endif //_DEFLANGS_H
365: /* webcpp - driver.h
366: * Copyright (C)2001-2003 Jeffrey Bakker
367:
368: * This program is free software; you can redistribute it and/or modify
369: * it under the terms of the GNU General Public License as published by
370: * the Free Software Foundation; either version 2 of the License, or
371: * (at your option) any later version.
372:
373: * This program is distributed in the hope that it will be useful,
374: * but WITHOUT ANY WARRANTY; without even the implied warranty of
375: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
376: * GNU General Public License for more details.
377:
378: * You should have received a copy of the GNU General Public License
379: * along with this program; if not, write to the Free Software
380: * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
381: ___________________________________ .. .
382: */
383:
384: #ifndef DRIVER_H
385: #define DRIVER_H
386:
387: #if defined(WIN32)
388: #define LIST_DIRECTORY "dir /s /b "
389: #define DIRECTORY_SLASH "\\"
390: #define DELETE "del webcppbatch.txt"
391: #define CYCLE_SPEED CLK_TCK
392: #else
393: #define LIST_DIRECTORY "ls "
394: #define DIRECTORY_SLASH "/"
395: #define DELETE "rm -f webcppbatch.txt"
396: #define CYCLE_SPEED CLOCKS_PER_SEC
397: #endif //defined(WIN32/UNIX)
398:
399: #define HELP_LANGUAGES 'L'
400: #define HELP_DEFAULT 'D'
401:
402: #include "engine.h"
403:
404: class Driver {
405: public:
406: Driver();
407: ~Driver();
408: static void help(char mode);
409: bool switch_parser(string arg);
410: char getExt(string filename);
411: string checkExt(string filename);
412: static void makeIndex(string prefix);
413: bool prep_files(string ifile, string ofile, char over);
414: string getTitle();
415: void drive();
416: void clean();
417:
418: protected:
419: Engine *lang;
420: string iFile;
421: string oFile;
422: };
423:
424: #endif //DRIVER_H
425: /* webcpp - engine.h
426: * Copyright (C)2001-2003 Jeffrey Bakker
427:
428: * This program is free software; you can redistribute it and/or modify
429: * it under the terms of the GNU General Public License as published by
430: * the Free Software Foundation; either version 2 of the License, or
431: * (at your option) any later version.
432:
433: * This program is distributed in the hope that it will be useful,
434: * but WITHOUT ANY WARRANTY; without even the implied warranty of
435: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
436: * GNU General Public License for more details.
437:
438: * You should have received a copy of the GNU General Public License
439: * along with this program; if not, write to the Free Software
440: * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
441: ___________________________________ .. .
442: */
443:
444: #ifndef _ENGINE_H
445: #define _ENGINE_H
446:
447: #define DBL_QUOTES 0x22
448: #define SIN_QUOTES 0x27
449: #define BCK_QUOTES 0x60
450:
451: #define Yes true
452: #define No false
453:
454: #include "cffile.h"
455: #include "theme.h"
456: #include <vector>
457: #include <string>
458: using namespace std;
459:
460: class Engine {
461:
462: public:
463: virtual ~Engine() {IO.close();}
464:
465: void init_switches();
466:
467: void pre_parse();
468: void makeMargin();
469: void makeAnchor();
470:
471: bool abortParse();
472: bool abortColour(int index);
473:
474: bool isInsideIt(int index, string start, string end);
475: bool isInsideTag(int index);
476: bool isNotWord(int index);
477: void eraseTags(int start, int fin);
478:
479: void parsePreProc();
480:
481: void parseSymbol();
482: bool colourSymbol(int start, int end);
483: bool isSymbol(char c);
484:
485: void parseLabel();
486: void colourLabel(int start, int end);
487:
488: void parseNum();
489: bool colourNum(int start, int end);
490:
491: void parseString(char quotetype, bool &inside);
492: void colourString(int index, bool &inside, string cssclass);
493:
494: void parseBigComment(string start, string end, bool &inside);
495:
496: void parseKeys();
497: void colourKeys(int index, string key, string cssclass);
498: bool isKey(int start, int end) const;
499: int noCaseFind(string search, int index);
500:
501: void parseVariable(string var);
502: void colourVariable(int index);
503:
504: void parseComment(string cmnt);
505: void colourComment(int index);
506: void parseCharZeroComment(char zchar);
507:
508: void loadKeys();
509: void doParsing();
510:
511: void begHtml(string name);
512: void endHtml();
513:
514: void hyperTagMe();
515: void hyperLinkMe();
516: void hyperNameMe();
517: void hyperIncludeMe();
518:
519: int getLineCount() {return lncount;}
520:
521: virtual
522: void fill() = 0;
523:
524: void toggleBigtab() {opt_bigtab = !opt_bigtab;}
525: void toggleWebcpp() {opt_webcpp = !opt_webcpp;}
526: void toggleHypinc() {opt_hypinc = !opt_hypinc;}
527: void toggleFollow() {opt_follow = !opt_follow;}
528: void toggleAnchor() {opt_anchor = !opt_anchor;}
529: void toggleNumber() {opt_number = !opt_number;}
530: void toggleExtcss() {opt_extcss = !opt_extcss;}
531:
532: void setTabWidth(string width);
533:
534: //options
535: protected:
536: bool opt_bigtab;
537: bool opt_webcpp;
538: bool opt_hypinc;
539: bool opt_follow;
540: bool opt_number;
541: bool opt_extcss;
542: bool opt_anchor;
543:
544: //parsing rules
545: protected:
546: bool doStrings;
547: bool doSymbols;
548: bool doNumbers;
549: bool doKeywords;
550: bool doCaseKeys;
551: bool doLabels;
552: bool doPreProc;
553: bool doScalars;
554: bool doArrays;
555: bool doHashes;
556: bool doHtmlTags;
557: bool doCComnt;
558: bool doHskComnt;
559: bool doHtmComnt;
560: bool doPasComnt;
561: bool doBigComnt;
562: bool doCinComnt;
563: bool doAdaComnt;
564: bool doUnxComnt;
565: bool doAsmComnt;
566: bool doRemComnt;
567: bool doFtnComnt;
568: bool doTclComnt;
569: bool doAspComnt;
570: bool doBatComnt;
571:
572: //theme file I/O engine
573: public:
574: CFfile IO;
575: Theme Scs2;
576: // vector<string> incref;
577:
578: //internal data
579: protected:
580: int lncount;
581: int tabwidth;
582: string tw;
583: string buffer;
584: vector<string> keys;
585: vector<string> types;
586:
587: bool inDblQuotes;
588: bool inSinQuotes;
589: bool inBckQuotes;
590: bool inHtmTags;
591: bool inComment;
592: bool endComment;
593: };
594:
595: #endif // _ENGINE_H
596: // The Ada95 Language definition file for Web C Plus Plus
597: // Generated by Jeffrey Bakker<jefskey@yahoo.com> using genlang.cgi
598: // genlang.cgi Copyright (C) 2002 Jeffrey Bakker
599:
600: #ifndef LANG_DEF_Ada95
601: #define LANG_DEF_Ada95
602:
603: #include "engine.h"
604:
605: class LangAda95 : public Engine {
606:
607: public:
608: LangAda95();
609: ~LangAda95() {IO.close();}
610: virtual void fill();
611:
612: };
613:
614: #endif //LANG_DEF_Ada95
615: // Author: Jeffrey Bakker | Date May14th 2002 | langasm.h
616:
617: // the Assembly Language definition file for Web C Plus Plus
618: // Webcpp Copyright (C) 2002 Jeffrey Bakker
619:
620:
621: #ifndef LANG_ASM_DEF_H
622: #define LANG_ASM_DEF_H
623:
624: #include "engine.h"
625:
626: class LangAssembler: public Engine {
627:
628: public:
629: LangAssembler();
630: virtual ~LangAssembler() {IO.close();}
631: virtual void fill();
632: };
633:
634: #endif // LANG_ASM_DEF_H
635: // the ASP Language definition file for Web C Plus Plus
636: // Author: Matt Runion <mrunion@yahoo.com>
637:
638: #ifndef LANG_DEF_ASP
639: #define LANG_DEF_ASP
640:
641: #include "langhtml.h"
642:
643: class LangAsp :public LangHtml {
644: public:
645: LangAsp();
646: ~LangAsp() {IO.close();}
647: virtual void fill();
648: };
649:
650: #endif //LANG_DEF_ASP
651: // The Basic Language definition file for Web C Plus Plus
652: // Generated by Jeffrey Bakker<jefskey@yahoo.com> using genlang.cgi
653: // genlang.cgi Copyright (C) 2002 Jeffrey Bakker
654:
655: #ifndef LANG_DEF_Basic
656: #define LANG_DEF_Basic
657:
658: #include "engine.h"
659:
660: class LangBasic : public Engine {
661:
662: public:
663: LangBasic();
664: ~LangBasic() {IO.close();}
665: virtual void fill();
666:
667: };
668:
669: #endif //LANG_DEF_Basic
670: // The DOS Batch Language definition file for Web C Plus Plus
671: // Generated by Daniel Lin <dan@dlin.d2g.com> using genlang.cgi
672: // genlang.cgi Copyright (C) 2002 Jeffrey Bakker
673:
674: #ifndef LANG_DEF_BATCH
675: #define LANG_DEF_BATCH
676:
677: #include "engine.h"
678:
679: class LangBatch : public Engine {
680:
681: public:
682: LangBatch();
683: ~LangBatch() {IO.close();}
684: virtual void fill();
685:
686: };
687:
688: #endif //LANG_DEF_BATCH
689: // Author: Jeffrey Bakker | Date: May14th 2002 | langc.h
690:
691: // the C Language definition file for Web C Plus Plus
692: // Webcpp Copyright (C) 2002 Jeffrey Bakker
693:
694:
695: #ifndef _LANG_C_DEF_H
696: #define _LANG_C_DEF_H
697:
698: #include "engine.h"
699:
700: class LangC : public Engine {
701:
702: public:
703: LangC();
704: virtual ~LangC() {IO.close();}
705: virtual void fill();
706: };
707:
708: #endif // _LANG_C_DEF_H
709:
710: // The Cg Language definition file for Web C Plus Plus
711: // Generated by Jeffrey Bakker<jefskey@yahoo.com> using genlang.cgi
712: // genlang.cgi Copyright (C) 2002 Jeffrey Bakker
713:
714: #ifndef LANG_DEF_NVIDIA_CG_SHADING_LANGUAGE
715: #define LANG_DEF_NVIDIA_CG_SHADING_LANGUAGE
716:
717: #include "engine.h"
718:
719: class LangCg : public Engine {
720:
721: public:
722: LangCg();
723: ~LangCg() {IO.close();}
724: virtual void fill();
725:
726: };
727:
728: #endif //LANG_DEF_NVIDIA_CG_SHADING_LANGUAGE
729: // The CLIPS Language definition file for Web C Plus Plus
730: // Generated by Walter Maner<maner@cs.bgsu.edu> using genlang.cgi
731: // genlang.cgi Copyright (C) 2002 Jeffrey Bakker
732:
733: #ifndef LANG_DEF_NASA_CLIPS
734: #define LANG_DEF_NASA_CLIPS
735:
736: #include "engine.h"
737:
738: class LangClips : public Engine {
739:
740: public:
741: LangClips();
742: ~LangClips() {IO.close();}
743: virtual void fill();
744:
745: };
746:
747: #endif //LANG_DEF_NASA_CLIPS
748:
749: // Author: Jeffrey Bakker | Date: May14th 2002 | langcpp.h
750:
751: // the C++ Language definition file for Web C Plus Plus
752: // Webcpp Copyright (C) 2002 Jeffrey Bakker
753:
754: #ifndef _LANG_CPP_DEF_H
755: #define _LANG_CPP_DEF_H
756:
757: #include "langc.h"
758:
759: class LangCPlusPlus : public LangC {
760:
761: public:
762: LangCPlusPlus();
763: virtual ~LangCPlusPlus() {IO.close();}
764: virtual void fill();
765: };
766:
767: #endif // _LANG_CPP_DEF_H
768: // The CSharp Language definition file for Web C Plus Plus
769: // Generated by Jeffrey Bakker<jefskey@yahoo.com> using genlang.cgi
770: // genlang.cgi Copyright (C) 2002 Jeffrey Bakker
771:
772: #ifndef LANG_DEF_CSharp
773: #define LANG_DEF_CSharp
774:
775: #include "engine.h"
776:
777: class LangCSharp : public Engine {
778:
779: public:
780: LangCSharp();
781: ~LangCSharp() {IO.close();}
782: virtual void fill();
783:
784: };
785:
786: #endif //LANG_DEF_CSharp
787:
788: // The emf Language definition file for Web C Plus Plus
789: // Generated by Dr. Detlef Groth<dgroth@gmx.de> using genlang.cgi
790: // genlang.cgi Copyright (C) 2002 Jeffrey Bakker
791:
792: #ifndef LANG_DEF_EMF
793: #define LANG_DEF_EMF
794:
795: #include "engine.h"
796:
797: class LangEmf : public Engine {
798:
799: public:
800: LangEmf();
801: ~LangEmf() {IO.close();}
802: virtual void fill();
803:
804: };
805:
806: #endif //LANG_DEF_EMF
807:
808: // The Euphoria Language definition file for Web C Plus Plus
809: // Generated by George Lewis <ghlewis@hotmail.com> using genlang.cgi
810: // genlang.cgi Copyright (C) 2002 Jeffrey Bakker
811:
812: #ifndef LANG_DEF_EUPHORIA
813: #define LANG_DEF_EUPHORIA
814:
815: #include "engine.h"
816:
817: class LangEuphoria : public Engine {
818:
819: public:
820: LangEuphoria();
821: ~LangEuphoria() {IO.close();}
822: virtual void fill();
823:
824: };
825:
826: #endif //LANG_DEF_EUPHORIA
827: // The Fortran Language definition file for Web C Plus Plus
828: // Generated by Jeffrey Bakker<jefskey@yahoo.com> using genlang.cgi
829: // genlang.cgi Copyright (C) 2002 Jeffrey Bakker
830:
831: #ifndef LANG_DEF_Fortran
832: #define LANG_DEF_Fortran
833:
834: #include "engine.h"
835:
836: class LangFortran : public Engine {
837:
838: public:
839: LangFortran();
840: ~LangFortran() {IO.close();}
841: virtual void fill();
842:
843: };
844:
845: #endif //LANG_DEF_Fortran
846: // The Haskell Language definition file for Web C Plus Plus
847: // Generated by Jeffrey Bakker<jefskey@yahoo.com> using genlang.cgi
848: // genlang.cgi Copyright (C) 2002 Jeffrey Bakker
849:
850: #ifndef LANG_DEF_Haskell
851: #define LANG_DEF_Haskell
852:
853: #include "engine.h"
854:
855: class LangHaskell : public Engine {
856:
857: public:
858: LangHaskell();
859: ~LangHaskell() {IO.close();}
860: virtual void fill();
861:
862: };
863:
864: #endif //LANG_DEF_Haskell
865:
866: // Author: Jeffrey Bakker | Date: May14th 2002 | langhtml.h
867:
868: // the HyperText Markup Language definition file for Web C Plus Plus
869: // Webcpp Copyright (C) 2002 Jeffrey Bakker
870:
871: #ifndef LANG_HTML_DEF_H
872: #define LANG_HTML_DEF_H
873:
874: #include "engine.h"
875:
876: class LangHtml: public Engine {
877:
878: public:
879: LangHtml();
880: ~LangHtml() {IO.close();}
881:
882: virtual void fill();
883: };
884:
885: #endif // LANG_HTML_DEF_H
886: // Author: Jeffrey Bakker | Date: May14th 2002 | langjava.h
887:
888: // the Java Language definition file for Web C Plus Plus
889: // Webcpp Copyright (C) 2002 Jeffrey Bakker
890:
891: #ifndef LANG_JAVA_DEF_H
892: #define LANG_JAVA_DEF_H
893:
894:
895:
896: #include "engine.h"
897:
898: class LangJava: public Engine {
899:
900: public:
901: LangJava();
902: virtual ~LangJava() {IO.close();}
903: virtual void fill();
904: };
905:
906: #endif // LANG_JAVA_DEF_H
907:
908: // The javascript Language definition file for Web C Plus Plus
909: // Generated by forrest johnston<forrest.johnston@attbi.com> using genlang.cgi
910: // genlang.cgi Copyright (C) 2002 Jeffrey Bakker
911:
912: #ifndef LANG_DEF_JSCRIPT
913: #define LANG_DEF_JSCRIPT
914:
915: #include "engine.h"
916:
917: class LangJScript : public Engine {
918:
919: public:
920: LangJScript();
921: ~LangJScript() {IO.close();}
922: virtual void fill();
923:
924: };
925:
926: #endif //LANG_DEF_JSCRIPT
927: // The Modula2 Language definition file for Web C Plus Plus
928: // Generated by Jeffrey Bakker<jefskey@yahoo.com> using genlang.cgi
929: // genlang.cgi Copyright (C) 2002 Jeffrey Bakker
930:
931: #ifndef LANG_DEF_Modula2
932: #define LANG_DEF_Modula2
933:
934: #include "engine.h"
935:
936: class LangModula2 : public Engine {
937:
938: public:
939: LangModula2();
940: ~LangModula2() {IO.close();}
941: virtual void fill();
942:
943: };
944:
945: #endif //LANG_DEF_Modula2
946: // The ObjectiveC Language definition file for Web C Plus Plus
947: // Generated by Jeffrey Bakker<jefskey@yahoo.com> using genlang.cgi
948: // genlang.cgi Copyright (C) 2002 Jeffrey Bakker
949:
950: #ifndef LANG_DEF_ObjectiveC
951: #define LANG_DEF_ObjectiveC
952:
953: #include "langc.h"
954:
955: class LangObjectiveC : public LangC {
956:
957: public:
958: LangObjectiveC();
959: ~LangObjectiveC() {IO.close();}
960: virtual void fill();
961:
962: };
963:
964: #endif //LANG_DEF_ObjectiveC
965: // The Pascal Language definition file for Web C Plus Plus
966: // Generated by Jeffrey Bakker<jefskey@yahoo.com> using genlang.cgi
967: // genlang.cgi Copyright (C) 2002 Jeffrey Bakker
968:
969: #ifndef LANG_DEF_Pascal
970: #define LANG_DEF_Pascal
971:
972: #include "engine.h"
973:
974: class LangPascal : public Engine {
975:
976: public:
977: LangPascal();
978: ~LangPascal() {IO.close();}
979: virtual void fill();
980:
981: };
982:
983: #endif //LANG_DEF_Pascal
984:
985: // The Power Builder 6.x Language definition file for Web C Plus Plus
986: // Generated by Philippe Torche<philippe.torche@swissonline.ch> using genlang.cgi
987: // genlang.cgi Copyright (C) 2002 Jeffrey Bakker
988:
989: #ifndef LANG_DEF_POWER_BUILDER
990: #define LANG_DEF_POWER_BUILDER
991:
992: #include "engine.h"
993:
994: class LangPBuilder : public Engine {
995:
996: public:
997: LangPBuilder();
998: ~LangPBuilder() {IO.close();}
999: virtual void fill();
1000:
1001: };
1002:
1003: #endif //LANG_DEF_POWER_BUILDER
1004: // Author: Jeffrey Bakker | Date: May14th 2002 | langperl.h
1005:
1006: // the PERL 5 Language definition file for Web C Plus Plus
1007: // Webcpp Copyright (C) 2002 Jeffrey Bakker
1008:
1009: #ifndef LANG_PERL_DEF_H
1010: #define LANG_PERL_DEF_H
1011:
1012: #include "engine.h"
1013:
1014: class LangPerl: public Engine {
1015:
1016: public :
1017: LangPerl();
1018: virtual ~LangPerl() {IO.close();}
1019: virtual void fill();
1020: };
1021:
1022: #endif // LANG_PERL_DEF_H
1023: // Author: Jeffrey Bakker | Date: May14th 2002 | langphp.h
1024:
1025: // the PHP Language definition file for Web C Plus Plus
1026: // Webcpp Copyright (C) 2002 Jeffrey Bakker
1027:
1028: #ifndef LANG_PHP_DEF_H
1029: #define LANG_PHP_DEF_H
1030:
1031: #include "engine.h"
1032:
1033: class LangPhp :public Engine {
1034: public:
1035: LangPhp();
1036: ~LangPhp() {IO.close();}
1037: virtual void fill();
1038: };
1039:
1040: #endif // LANG_PHP_DEF_H
1041: // Author: Jeffrey Bakker | Date: May14th 2002 | langpython.h
1042:
1043: // the Python Language definition file for Web C Plus Plus
1044: // Webcpp Copyright (C) 2002 Jeffrey Bakker
1045:
1046: #ifndef LANG_PYTHON_DEF_H
1047: #define LANG_PYTHON_DEF_H
1048:
1049: #include "engine.h"
1050:
1051: class LangPython : public Engine {
1052:
1053: public:
1054: LangPython();
1055: ~LangPython() {IO.close();}
1056:
1057: virtual void fill();
1058: };
1059:
1060: #endif // LANG_PYTHON_DEF_H
1061:
1062: // The RenderMan Shading Language Language definition file for Web C Plus Plus
1063: // Generated by Mark Williams <markdjwilliams@hotmail.com> using genlang.cgi
1064: // genlang.cgi Copyright (C) 2002 Jeffrey Bakker
1065:
1066: #ifndef LANG_DEF_RENDERMAN_SHADING_LANGUAGE
1067: #define LANG_DEF_RENDERMAN_SHADING_LANGUAGE
1068:
1069: #include "engine.h"
1070:
1071: class LangRenderMan : public Engine {
1072:
1073: public:
1074: LangRenderMan();
1075: ~LangRenderMan() {IO.close();}
1076: virtual void fill();
1077:
1078: };
1079:
1080: #endif //LANG_DEF_RENDERMAN_SHADING_LANGUAGE
1081:
1082: // The Ruby Language definition file for Web C Plus Plus
1083: // Generated by Jeffrey Bakker <jefskey@yahoo.com> using genlang.cgi
1084: // genlang.cgi Copyright (C) 2002 Jeffrey Bakker
1085:
1086: #ifndef LANG_DEF_RUBY
1087: #define LANG_DEF_RUBY
1088:
1089: #include "engine.h"
1090:
1091: class LangRuby : public Engine {
1092:
1093: public:
1094: LangRuby();
1095: ~LangRuby() {IO.close();}
1096: virtual void fill();
1097:
1098: };
1099:
1100: #endif //LANG_DEF_RUBY
1101: // Author: Jeffrey Bakker | Date: May14th 2002 | langshell.h
1102:
1103: // the Bourne shell Syntax definition file for Web C Plus Plus
1104: // Webcpp Copyright (C) 2002 Jeffrey Bakker
1105:
1106: #ifndef LANG_SHELL_DEF_H
1107: #define LANG_SHELL_DEF_H
1108:
1109: #include "engine.h"
1110:
1111: class LangShell: public Engine {
1112:
1113: public :
1114: LangShell();
1115: virtual ~LangShell() {IO.close();}
1116: virtual void fill();
1117: };
1118:
1119: #endif // LANG_SHELL_DEF_H
1120: // The SQL Language definition file for Web C Plus Plus
1121: // Generated by Jeffrey Bakker<jefskey@yahoo.com> using genlang.cgi
1122: // genlang.cgi Copyright (C) 2002 Jeffrey Bakker
1123:
1124: #ifndef LANG_DEF_SQL
1125: #define LANG_DEF_SQL
1126:
1127: #include "engine.h"
1128:
1129: class LangSQL : public Engine {
1130:
1131: public:
1132: LangSQL();
1133: ~LangSQL() {IO.close();}
1134: virtual void fill();
1135:
1136: };
1137:
1138: #endif //LANG_DEF_SQL
1139: // The Tcl Language definition file for Web C Plus Plus
1140: // Generated by Jeffrey Bakker<jefskey@yahoo.com> using genlang.cgi
1141: // genlang.cgi Copyright (C) 2002 Jeffrey Bakker
1142:
1143: #ifndef LANG_DEF_Tcl
1144: #define LANG_DEF_Tcl
1145:
1146: #include "engine.h"
1147:
1148: class LangTcl : public Engine {
1149:
1150: public:
1151: LangTcl();
1152: ~LangTcl() {IO.close();}
1153: virtual void fill();
1154:
1155: };
1156:
1157: #endif //LANG_DEF_Tcl
1158: #include "engine.h"
1159:
1160: #ifndef _LANG_DEF_TEXT_H
1161: #define _LANG_DEF_TEXT_H
1162:
1163: class LangText :public Engine {
1164: public:
1165: LangText();
1166: ~LangText() {IO.close();}
1167: virtual void fill();
1168: };
1169:
1170: #endif // _LANG_DEF_TEXT_H
1171: // Author: Jeffrey Bakker | Date: January 29th 2003 | languscript.h
1172:
1173: // the UnrealScript Language definition file for Web C Plus Plus
1174: // Webcpp Copyright (C) 2002 Jeffrey Bakker
1175:
1176: #ifndef _LANG_UNREALSCRIPT_DEF_H
1177: #define _LANG_UNREALSCRIPT_DEF_H
1178:
1179: #include "langc.h"
1180:
1181: class LangUScript : public LangC {
1182:
1183: public:
1184: LangUScript();
1185: virtual ~LangUScript() {IO.close();}
1186: virtual void fill();
1187: };
1188:
1189: #endif // _LANG_UNREALSCRIPT_DEF_H
1190: // The VHDL Language definition file for Web C Plus Plus
1191: // Generated by Thomas Hedler<thomas.hedler@fen-net.de> using genlang.cgi
1192: // genlang.cgi Copyright (C) 2002 Jeffrey Bakker
1193:
1194: #ifndef LANG_DEF_VHDL
1195: #define LANG_DEF_VHDL
1196:
1197: #include "engine.h"
1198:
1199: class LangVHDL : public Engine {
1200:
1201: public:
1202: LangVHDL();
1203: ~LangVHDL() {IO.close();}
1204: virtual void fill();
1205:
1206: };
1207:
1208: #endif //LANG_DEF_VHDL
1209: /* webcpp - theme.h
1210: * Copyright (C)2001-2003 Jeffrey Bakker
1211:
1212: * This program is free software; you can redistribute it and/or modify
1213: * it under the terms of the GNU General Public License as published by
1214: * the Free Software Foundation; either version 2 of the License, or
1215: * (at your option) any later version.
1216:
1217: * This program is distributed in the hope that it will be useful,
1218: * but WITHOUT ANY WARRANTY; without even the implied warranty of
1219: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1220: * GNU General Public License for more details.
1221:
1222: * You should have received a copy of the GNU General Public License
1223: * along with this program; if not, write to the Free Software
1224: * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
1225: ___________________________________ .. .
1226: */
1227:
1228:
1229: #ifndef _THEME_H_
1230: #define _THEME_H_
1231:
1232: #define BGCOLOR 0
1233: #define PREPROC 1
1234: #define NORTEXT 2
1235: #define SYMBOLS 3
1236: #define KEYWORD 4
1237: #define KEYTYPE 5
1238: #define INTEGER 6
1239: #define FLOATPT 7
1240: #define DBLQUOT 8
1241: #define SINQUOT 9
1242: #define COMMENT 10
1243:
1244: // use Cfour engines
1245: #include "cffile.h"
1246: #include "cfdatapair.h"
1247:
1248: #include <vector>
1249: using namespace std;