1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: cx_idlco.cxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
32 #include <s2_luidl/cx_idlco.hxx>
35 // NOT FULLY DECLARED SERVICES
36 #include <s2_luidl/cx_sub.hxx>
37 #include <s2_dsapi/cx_dsapi.hxx>
38 #include <tools/tkpchars.hxx>
39 #include <tokens/tkpstam2.hxx>
40 #include <s2_luidl/tk_ident.hxx>
41 #include <s2_luidl/tk_keyw.hxx>
42 #include <s2_luidl/tk_punct.hxx>
43 #include <s2_luidl/tokrecv.hxx>
44 #include <x_parse2.hxx>
53 const intt C_nCppInitialNrOfStati
= 400;
54 const intt C_nStatusSize
= 128;
58 const uintt nF_fin_Error
= 1;
59 const uintt nF_fin_Ignore
= 2;
60 const uintt nF_fin_Identifier
= 3;
61 const uintt nF_fin_Keyword
= 4;
62 const uintt nF_fin_Punctuation
= 5;
63 const uintt nF_fin_EOL
= 6;
64 const uintt nF_fin_EOF
= 7;
66 const uintt nF_goto_MLDocu
= 10;
67 const uintt nF_goto_SLDocu
= 11;
68 const uintt nF_goto_MLComment
= 12;
69 const uintt nF_goto_SLComment
= 13;
70 const uintt nF_goto_Praeprocessor
= 14;
71 const uintt nF_goto_Assignment
= 15;
75 const UINT16 nTok_bty_any
= 100 + TokBuiltInType::bty_any
;
76 const UINT16 nTok_bty_boolean
= 100 + TokBuiltInType::bty_boolean
;
77 const UINT16 nTok_bty_byte
= 100 + TokBuiltInType::bty_byte
;
78 const UINT16 nTok_bty_char
= 100 + TokBuiltInType::bty_char
;
79 const UINT16 nTok_bty_double
= 100 + TokBuiltInType::bty_double
;
80 const UINT16 nTok_bty_hyper
= 100 + TokBuiltInType::bty_hyper
;
81 const UINT16 nTok_bty_long
= 100 + TokBuiltInType::bty_long
;
82 const UINT16 nTok_bty_short
= 100 + TokBuiltInType::bty_short
;
83 const UINT16 nTok_bty_string
= 100 + TokBuiltInType::bty_string
;
84 const UINT16 nTok_bty_void
= 100 + TokBuiltInType::bty_void
;
85 const UINT16 nTok_bty_ellipse
= 100 + TokBuiltInType::bty_ellipse
;
87 const UINT16 nTok_tmod_unsigned
= 200 + TokTypeModifier::tmod_unsigned
;
88 const UINT16 nTok_tmod_sequence
= 200 + TokTypeModifier::tmod_sequence
;
90 const UINT16 nTok_ph_in
= 250 + TokParameterHandling::ph_in
;
91 const UINT16 nTok_ph_out
= 250 + TokParameterHandling::ph_out
;
92 const UINT16 nTok_ph_inout
= 250 + TokParameterHandling::ph_inout
;
94 const UINT16 nTok_mt_attribute
= 300 + TokMetaType::mt_attribute
;
95 const UINT16 nTok_mt_constants
= 300 + TokMetaType::mt_constants
;
96 const UINT16 nTok_mt_enum
= 300 + TokMetaType::mt_enum
;
97 const UINT16 nTok_mt_exception
= 300 + TokMetaType::mt_exception
;
98 const UINT16 nTok_mt_ident
= 300 + TokMetaType::mt_ident
;
99 const UINT16 nTok_mt_interface
= 300 + TokMetaType::mt_interface
;
100 const UINT16 nTok_mt_module
= 300 + TokMetaType::mt_module
;
101 const UINT16 nTok_mt_property
= 300 + TokMetaType::mt_property
;
102 const UINT16 nTok_mt_service
= 300 + TokMetaType::mt_service
;
103 const UINT16 nTok_mt_singleton
= 300 + TokMetaType::mt_singleton
;
104 const UINT16 nTok_mt_struct
= 300 + TokMetaType::mt_struct
;
105 const UINT16 nTok_mt_typedef
= 300 + TokMetaType::mt_typedef
;
106 const UINT16 nTok_mt_uik
= 300 + TokMetaType::mt_uik
;
108 const UINT16 nTok_ste_bound
= 400 + TokStereotype::ste_bound
;
109 const UINT16 nTok_ste_constrained
= 400 + TokStereotype::ste_constrained
;
110 const UINT16 nTok_ste_const
= 400 + TokStereotype::ste_const
;
111 const UINT16 nTok_ste_maybeambiguous
= 400 + TokStereotype::ste_maybeambiguous
;
112 const UINT16 nTok_ste_maybedefault
= 400 + TokStereotype::ste_maybedefault
;
113 const UINT16 nTok_ste_maybevoid
= 400 + TokStereotype::ste_maybevoid
;
114 const UINT16 nTok_ste_oneway
= 400 + TokStereotype::ste_oneway
;
115 const UINT16 nTok_ste_optional
= 400 + TokStereotype::ste_optional
;
116 const UINT16 nTok_ste_readonly
= 400 + TokStereotype::ste_readonly
;
117 const UINT16 nTok_ste_removable
= 400 + TokStereotype::ste_removable
;
118 const UINT16 nTok_ste_virtual
= 400 + TokStereotype::ste_virtual
;
119 const UINT16 nTok_ste_transient
= 400 + TokStereotype::ste_transient
;
120 const UINT16 nTok_ste_published
= 400 + TokStereotype::ste_published
;
122 const UINT16 nTok_raises
= 501;
123 const UINT16 nTok_needs
= 502;
124 const UINT16 nTok_observes
= 503;
126 const UINT16 nTok_assignment
= 550;
128 const UINT16 nTok_ignore
= 600;
129 const UINT16 nTok_none_MLCommentBegin
= 601;
130 const UINT16 nTok_none_SLCommentBegin
= 602;
131 const UINT16 nTok_none_MLDocuBegin
= 603;
132 const UINT16 nTok_none_SLDocuBegin
= 604;
133 const UINT16 nTok_none_PraeprocessorBegin
= 605;
136 const UINT16 nTok_punct_BracketOpen
= 700 + TokPunctuation::BracketOpen
;
137 const UINT16 nTok_punct_BracketClose
= 700 + TokPunctuation::BracketClose
;
138 const UINT16 nTok_punct_ArrayBracketOpen
= 700 + TokPunctuation::ArrayBracketOpen
;
139 const UINT16 nTok_punct_ArrayBracketClose
= 700 + TokPunctuation::ArrayBracketClose
;
140 const UINT16 nTok_punct_CurledBracketOpen
= 700 + TokPunctuation::CurledBracketOpen
;
141 const UINT16 nTok_punct_CurledBracketClose
= 700 + TokPunctuation::CurledBracketClose
;
142 const UINT16 nTok_punct_Semicolon
= 700 + TokPunctuation::Semicolon
;
143 const UINT16 nTok_punct_Colon
= 700 + TokPunctuation::Colon
;
144 const UINT16 nTok_punct_DoubleColon
= 700 + TokPunctuation::DoubleColon
;
145 const UINT16 nTok_punct_Comma
= 700 + TokPunctuation::Comma
;
146 const UINT16 nTok_punct_Minus
= 700 + TokPunctuation::Minus
;
147 const UINT16 nTok_punct_Fullstop
= 700 + TokPunctuation::Fullstop
;
148 const UINT16 nTok_punct_Lesser
= 700 + TokPunctuation::Lesser
;
149 const UINT16 nTok_punct_Greater
= 700 + TokPunctuation::Greater
;
151 const UINT16 nTok_EOL
= 801;
152 const UINT16 nTok_EOF
= 802;
156 Context_UidlCode::Context_UidlCode( Token_Receiver
& o_rReceiver
,
157 DYN TkpDocuContext
& let_drContext_Docu
)
158 : aStateMachine(C_nStatusSize
,C_nCppInitialNrOfStati
),
159 pReceiver(&o_rReceiver
),
160 pDocuContext(&let_drContext_Docu
),
161 dpContext_MLComment(0),
162 dpContext_SLComment(0),
163 dpContext_Preprocessor(0),
164 dpContext_Assignment(0),
168 dpContext_MLComment
= new Context_MLComment(o_rReceiver
,*this),
169 dpContext_SLComment
= new Context_SLComment(o_rReceiver
,*this),
170 dpContext_Preprocessor
= new Context_Praeprocessor(o_rReceiver
,*this),
171 dpContext_Assignment
= new Context_Assignment(o_rReceiver
,*this),
173 pDocuContext
->SetParentContext(*this,"*/");
177 Context_UidlCode::~Context_UidlCode()
182 Context_UidlCode::ReadCharChain( CharacterSource
& io_rText
)
187 StmBoundsStatu2
& rBound
= aStateMachine
.GetCharChain(nTokenId
, io_rText
);
190 // The order of the next two lines is essential, because
191 // pFollowUpContext may be changed by PerformStatusFunction() also,
192 // which then MUST override the previous assignment.
193 pFollowUpContext
= rBound
.FollowUpContext();
194 PerformStatusFunction(rBound
.StatusFunctionNr(), nTokenId
, io_rText
);
198 Context_UidlCode::PassNewToken()
202 pReceiver
->Receive(*pNewToken
.Release());
209 Context_UidlCode::FollowUpContext()
211 csv_assert(pFollowUpContext
!= 0);
212 return *pFollowUpContext
;
216 Context_UidlCode::PerformStatusFunction( uintt i_nStatusSignal
,
218 CharacterSource
& io_rText
)
220 switch (i_nStatusSignal
)
224 throw X_AutodocParser(X_AutodocParser::x_InvalidChar
);
225 // no break, because of throw
230 case nF_fin_Identifier
:
231 pNewToken
= new TokIdentifier(io_rText
.CutToken());
235 switch ( i_nTokenId
/ 50 )
238 pNewToken
= new TokBuiltInType(i_nTokenId
- 100);
241 pNewToken
= new TokTypeModifier(i_nTokenId
- 200);
244 pNewToken
= new TokParameterHandling(i_nTokenId
- 250);
247 pNewToken
= new TokMetaType(i_nTokenId
- 300);
250 pNewToken
= new TokStereotype(i_nTokenId
- 400);
253 switch (i_nTokenId
-500)
256 pNewToken
= new TokRaises
;
259 pNewToken
= new TokNeeds
;
262 pNewToken
= new TokObserves
;
270 } // end switch ( i_nTokenId / 50 )
272 case nF_fin_Punctuation
:
274 if (i_nTokenId
== nTok_punct_DoubleColon
)
275 pNewToken
= new TokNameSeparator
;
277 pNewToken
= new TokPunctuation(i_nTokenId
- 700);
281 pNewToken
= new Tok_EOL
;
282 pReceiver
->Increment_CurLine();
285 pNewToken
= new Tok_EOF
;
288 while ( io_rText
.CurChar() == '*')
291 pDocuContext
->SetMode_IsMultiLine(true);
295 pDocuContext
->SetMode_IsMultiLine(false);
297 case nF_goto_MLComment
:
299 case nF_goto_SLComment
:
301 case nF_goto_Praeprocessor
:
303 case nF_goto_Assignment
:
307 } // end switch (i_nStatusSignal)
311 Context_UidlCode::SetupStateMachine()
313 // Besondere Array-Stati (kein Tokenabschluss oder Kontextwechsel):
314 // const INT16 top = 0; // Top-Status
315 const INT16 wht
= 1; // Whitespace-überlese-Status
316 const INT16 bez
= 2; // Bezeichner-lese-Status
318 // Tokenfinish-Stati:
319 const INT16 finErr
= 3;
320 const INT16 finIgn
= 4;
321 const INT16 finBez
= 5;
322 const INT16 finKeyw
= 6;
323 const INT16 finPunct
= 7;
324 const INT16 finEOL
= 8;
325 const INT16 finEOF
= 9;
327 // Kontextwechsel-Stati:
328 const INT16 gotoMld
= 10;
329 const INT16 gotoSld
= 11;
330 const INT16 gotoMlc
= 12;
331 const INT16 gotoSlc
= 13;
332 const INT16 gotoPrp
= 14;
333 const INT16 gotoAsg
= 15;
335 // Konstanten zur Benutzung in der Tabelle:
336 const INT16 err
= finErr
;
337 const INT16 fbz
= finBez
;
338 const INT16 fig
= finIgn
;
339 const INT16 fof
= finEOF
;
340 // const INT16 fkw = finKeyw;
341 // const INT16 fpc = finPunct;
343 /// Die '0'en werden spaeter durch AddToken() ersetzt.
345 const INT16 A_nTopStatus
[C_nStatusSize
] =
346 // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
347 {fof
,err
,err
,err
,err
,err
,err
,err
,err
,wht
, 0,wht
,wht
, 0,err
,err
,
348 err
,err
,err
,err
,err
,err
,err
,err
,err
,err
,fof
,err
,err
,err
,err
,err
, // 16 ...
349 wht
,err
,wht
, 0,err
,err
,err
,err
, 0, 0,err
,err
, 0, 0, 0,err
,
350 bez
,bez
,bez
,bez
,bez
,bez
,bez
,bez
,bez
,bez
,err
,err
,err
,err
,err
,err
, // 48 ...
351 err
,bez
,bez
,bez
,bez
,bez
,bez
,bez
,bez
,bez
,bez
,bez
,bez
,bez
,bez
,bez
,
352 bez
,bez
,bez
,bez
,bez
,bez
,bez
,bez
,bez
,bez
,bez
, 0,err
, 0,err
,bez
, // 80 ...
353 err
,bez
,bez
,bez
,bez
,bez
,bez
,bez
,bez
,bez
,bez
,bez
,bez
,bez
,bez
,bez
,
354 bez
,bez
,bez
,bez
,bez
,bez
,bez
,bez
,bez
,bez
,bez
, 0,err
, 0,err
,err
, // 112 ...
357 const INT16 A_nWhitespaceStatus
[C_nStatusSize
] =
358 // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
359 {fof
,err
,err
,err
,err
,err
,err
,err
,err
,wht
,fig
,wht
,wht
,fig
,err
,err
,
360 err
,err
,err
,err
,err
,err
,err
,err
,err
,err
,fof
,err
,err
,err
,err
,err
, // 16 ...
361 wht
,fig
,wht
,fig
,fig
,fig
,fig
,fig
,fig
,fig
,fig
,fig
,fig
,fig
,fig
,fig
,
362 fig
,fig
,fig
,fig
,fig
,fig
,fig
,fig
,fig
,fig
,fig
,fig
,fig
,fig
,fig
,fig
, // 48 ...
363 fig
,fig
,fig
,fig
,fig
,fig
,fig
,fig
,fig
,fig
,fig
,fig
,fig
,fig
,fig
,fig
,
364 fig
,fig
,fig
,fig
,fig
,fig
,fig
,fig
,fig
,fig
,fig
,fig
,fig
,fig
,fig
,fig
, // 80 ...
365 fig
,fig
,fig
,fig
,fig
,fig
,fig
,fig
,fig
,fig
,fig
,fig
,fig
,fig
,fig
,fig
,
366 fig
,fig
,fig
,fig
,fig
,fig
,fig
,fig
,fig
,fig
,fig
,fig
,fig
,fig
,fig
,err
// 112 ...
369 const INT16 A_nBezeichnerStatus
[C_nStatusSize
] =
370 // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
371 {fbz
,err
,err
,err
,err
,err
,err
,err
,err
,fbz
,fbz
,fbz
,fbz
,fbz
,err
,err
,
372 err
,err
,err
,err
,err
,err
,err
,err
,err
,err
,fbz
,err
,err
,err
,err
,err
, // 16 ...
373 fbz
,fbz
,fbz
,fbz
,fbz
,fbz
,fbz
,fbz
,fbz
,fbz
,fbz
,fbz
,fbz
,fbz
,fbz
,fbz
,
374 bez
,bez
,bez
,bez
,bez
,bez
,bez
,bez
,bez
,bez
,fbz
,fbz
,fbz
,fbz
,fbz
,fbz
, // 48 ...
375 fbz
,bez
,bez
,bez
,bez
,bez
,bez
,bez
,bez
,bez
,bez
,bez
,bez
,bez
,bez
,bez
,
376 bez
,bez
,bez
,bez
,bez
,bez
,bez
,bez
,bez
,bez
,bez
,fbz
,fbz
,fbz
,fbz
,bez
, // 80 ...
377 fbz
,bez
,bez
,bez
,bez
,bez
,bez
,bez
,bez
,bez
,bez
,bez
,bez
,bez
,bez
,bez
,
378 bez
,bez
,bez
,bez
,bez
,bez
,bez
,bez
,bez
,bez
,bez
,fbz
,fbz
,fbz
,fbz
,err
// 112 ...
381 const INT16 A_nPunctDefStatus
[C_nStatusSize
] =
382 // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
383 {err
,err
,err
,err
,err
,err
,err
,err
,err
,err
,err
,err
,err
,err
,err
,err
,
384 err
,err
,err
,err
,err
,err
,err
,err
,err
,err
,err
,err
,err
,err
,err
,err
, // 16 ...
385 err
,err
,err
,err
,err
,err
,err
,err
,err
,err
,err
,err
,err
,err
,err
,err
,
386 err
,err
,err
,err
,err
,err
,err
,err
,err
,err
,err
,err
,err
,err
,err
,err
, // 48 ...
387 err
,err
,err
,err
,err
,err
,err
,err
,err
,err
,err
,err
,err
,err
,err
,err
,
388 err
,err
,err
,err
,err
,err
,err
,err
,err
,err
,err
,err
,err
,err
,err
,err
, // 80 ...
389 err
,err
,err
,err
,err
,err
,err
,err
,err
,err
,err
,err
,err
,err
,err
,err
,
390 err
,err
,err
,err
,err
,err
,err
,err
,err
,err
,err
,err
,err
,err
,err
,err
// 112 ...
393 const INT16 A_nKeywordDefStatus
[C_nStatusSize
] =
394 // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
395 {fbz
,err
,err
,err
,err
,err
,err
,err
,err
,fbz
,fbz
,fbz
,fbz
,fbz
,err
,err
,
396 err
,err
,err
,err
,err
,err
,err
,err
,err
,err
,fbz
,err
,err
,err
,err
,err
, // 16 ...
397 fbz
,fbz
,fbz
,fbz
,fbz
,fbz
,fbz
,fbz
,fbz
,fbz
,fbz
,fbz
,fbz
,fbz
,fbz
,fbz
,
398 bez
,bez
,bez
,bez
,bez
,bez
,bez
,bez
,bez
,bez
,fbz
,fbz
,fbz
,fbz
,fbz
,fbz
, // 48 ...
399 fbz
,bez
,bez
,bez
,bez
,bez
,bez
,bez
,bez
,bez
,bez
,bez
,bez
,bez
,bez
,bez
,
400 bez
,bez
,bez
,bez
,bez
,bez
,bez
,bez
,bez
,bez
,bez
,fbz
,fbz
,fbz
,fbz
,bez
, // 80 ...
401 fbz
,bez
,bez
,bez
,bez
,bez
,bez
,bez
,bez
,bez
,bez
,bez
,bez
,bez
,bez
,bez
,
402 bez
,bez
,bez
,bez
,bez
,bez
,bez
,bez
,bez
,bez
,bez
,fbz
,fbz
,fbz
,fbz
,err
// 112 ...
405 DYN StmArrayStatu2
* dpStatusTop
406 = new StmArrayStatu2( C_nStatusSize
, A_nTopStatus
, 0, true);
407 DYN StmArrayStatu2
* dpStatusWhite
408 = new StmArrayStatu2( C_nStatusSize
, A_nWhitespaceStatus
, 0, true);
409 DYN StmArrayStatu2
* dpStatusBez
410 = new StmArrayStatu2( C_nStatusSize
, A_nBezeichnerStatus
, 0, true);
412 DYN StmBoundsStatu2
* dpBst_finErr
413 = new StmBoundsStatu2( *this, TkpContext_Null2_(), nF_fin_Error
, true );
414 DYN StmBoundsStatu2
* dpBst_finIgn
415 = new StmBoundsStatu2( *this, *this, nF_fin_Ignore
, true );
416 DYN StmBoundsStatu2
* dpBst_finBez
417 = new StmBoundsStatu2( *this, *this, nF_fin_Identifier
, true );
418 DYN StmBoundsStatu2
* dpBst_finKeyw
419 = new StmBoundsStatu2( *this, *this, nF_fin_Keyword
, false );
420 DYN StmBoundsStatu2
* dpBst_finPunct
421 = new StmBoundsStatu2( *this, *this, nF_fin_Punctuation
, false );
422 DYN StmBoundsStatu2
* dpBst_finEOL
423 = new StmBoundsStatu2( *this, *this, nF_fin_EOL
, false );
424 DYN StmBoundsStatu2
* dpBst_finEOF
425 = new StmBoundsStatu2( *this, TkpContext_Null2_(), nF_fin_EOF
, false );
427 DYN StmBoundsStatu2
* dpBst_gotoMld
428 = new StmBoundsStatu2( *this, *pDocuContext
, nF_goto_MLDocu
, false );
429 DYN StmBoundsStatu2
* dpBst_gotoSld
430 = new StmBoundsStatu2( *this, *pDocuContext
, nF_goto_SLDocu
, false );
431 DYN StmBoundsStatu2
* dpBst_gotoMlc
432 = new StmBoundsStatu2( *this, *dpContext_MLComment
, nF_goto_MLComment
, false );
433 DYN StmBoundsStatu2
* dpBst_gotoSlc
434 = new StmBoundsStatu2( *this, *dpContext_SLComment
, nF_goto_SLComment
, false );
435 DYN StmBoundsStatu2
* dpBst_gotoPrp
436 = new StmBoundsStatu2( *this, *dpContext_Preprocessor
, nF_goto_Praeprocessor
, false );
437 DYN StmBoundsStatu2
* dpBst_gotoAsg
438 = new StmBoundsStatu2( *this, *dpContext_Assignment
, nF_goto_Assignment
, false );
441 aStateMachine
.AddStatus(dpStatusTop
);
443 aStateMachine
.AddStatus(dpStatusWhite
);
444 aStateMachine
.AddStatus(dpStatusBez
);
446 aStateMachine
.AddStatus(dpBst_finErr
);
447 aStateMachine
.AddStatus(dpBst_finIgn
);
448 aStateMachine
.AddStatus(dpBst_finBez
);
449 aStateMachine
.AddStatus(dpBst_finKeyw
);
450 aStateMachine
.AddStatus(dpBst_finPunct
);
451 aStateMachine
.AddStatus(dpBst_finEOL
);
452 aStateMachine
.AddStatus(dpBst_finEOF
);
454 aStateMachine
.AddStatus(dpBst_gotoMld
);
455 aStateMachine
.AddStatus(dpBst_gotoSld
);
456 aStateMachine
.AddStatus(dpBst_gotoMlc
);
457 aStateMachine
.AddStatus(dpBst_gotoSlc
);
458 aStateMachine
.AddStatus(dpBst_gotoPrp
);
459 aStateMachine
.AddStatus(dpBst_gotoAsg
);
461 aStateMachine
.AddToken("any", nTok_bty_any
, A_nKeywordDefStatus
, finKeyw
);
462 aStateMachine
.AddToken("attribute", nTok_mt_attribute
, A_nKeywordDefStatus
, finKeyw
);
463 aStateMachine
.AddToken("boolean", nTok_bty_boolean
, A_nKeywordDefStatus
, finKeyw
);
464 aStateMachine
.AddToken("bound", nTok_ste_bound
, A_nKeywordDefStatus
, finKeyw
);
465 aStateMachine
.AddToken("byte", nTok_bty_byte
, A_nKeywordDefStatus
, finKeyw
);
466 aStateMachine
.AddToken("char", nTok_bty_char
, A_nKeywordDefStatus
, finKeyw
);
467 aStateMachine
.AddToken("const", nTok_ste_const
, A_nKeywordDefStatus
, finKeyw
);
468 aStateMachine
.AddToken("constants", nTok_mt_constants
, A_nKeywordDefStatus
, finKeyw
);
469 aStateMachine
.AddToken("constrained",
470 nTok_ste_constrained
, A_nKeywordDefStatus
, finKeyw
);
471 aStateMachine
.AddToken("double", nTok_bty_double
, A_nKeywordDefStatus
, finKeyw
);
472 aStateMachine
.AddToken("enum", nTok_mt_enum
, A_nKeywordDefStatus
, finKeyw
);
473 aStateMachine
.AddToken("exception", nTok_mt_exception
, A_nKeywordDefStatus
, finKeyw
);
474 aStateMachine
.AddToken("hyper", nTok_bty_hyper
, A_nKeywordDefStatus
, finKeyw
);
475 aStateMachine
.AddToken("ident", nTok_mt_ident
, A_nKeywordDefStatus
, finKeyw
);
476 aStateMachine
.AddToken("in", nTok_ph_in
, A_nKeywordDefStatus
, finKeyw
);
477 aStateMachine
.AddToken("inout", nTok_ph_inout
, A_nKeywordDefStatus
, finKeyw
);
478 aStateMachine
.AddToken("interface", nTok_mt_interface
, A_nKeywordDefStatus
, finKeyw
);
479 aStateMachine
.AddToken("long", nTok_bty_long
, A_nKeywordDefStatus
, finKeyw
);
480 aStateMachine
.AddToken("maybeambiguous",
481 nTok_ste_maybeambiguous
,A_nKeywordDefStatus
, finKeyw
);
482 aStateMachine
.AddToken("maybedefault",
483 nTok_ste_maybedefault
, A_nKeywordDefStatus
, finKeyw
);
484 aStateMachine
.AddToken("maybevoid", nTok_ste_maybevoid
, A_nKeywordDefStatus
, finKeyw
);
485 aStateMachine
.AddToken("module", nTok_mt_module
, A_nKeywordDefStatus
, finKeyw
);
486 aStateMachine
.AddToken("needs", nTok_needs
, A_nKeywordDefStatus
, finKeyw
);
487 aStateMachine
.AddToken("observes", nTok_observes
, A_nKeywordDefStatus
, finKeyw
);
488 aStateMachine
.AddToken("oneway", nTok_ste_oneway
, A_nKeywordDefStatus
, finKeyw
);
489 aStateMachine
.AddToken("optional", nTok_ste_optional
, A_nKeywordDefStatus
, finKeyw
);
490 aStateMachine
.AddToken("out", nTok_ph_out
, A_nKeywordDefStatus
, finKeyw
);
491 aStateMachine
.AddToken("property", nTok_mt_property
, A_nKeywordDefStatus
, finKeyw
);
492 aStateMachine
.AddToken("published", nTok_ste_published
, A_nKeywordDefStatus
, finKeyw
);
493 aStateMachine
.AddToken("raises", nTok_raises
, A_nKeywordDefStatus
, finKeyw
);
494 aStateMachine
.AddToken("readonly", nTok_ste_readonly
, A_nKeywordDefStatus
, finKeyw
);
495 aStateMachine
.AddToken("removable", nTok_ste_removable
, A_nKeywordDefStatus
, finKeyw
);
496 aStateMachine
.AddToken("sequence", nTok_tmod_sequence
, A_nKeywordDefStatus
, finKeyw
);
497 aStateMachine
.AddToken("service", nTok_mt_service
, A_nKeywordDefStatus
, finKeyw
);
498 aStateMachine
.AddToken("short", nTok_bty_short
, A_nKeywordDefStatus
, finKeyw
);
499 aStateMachine
.AddToken("singleton", nTok_mt_singleton
, A_nKeywordDefStatus
, finKeyw
);
500 aStateMachine
.AddToken("string", nTok_bty_string
, A_nKeywordDefStatus
, finKeyw
);
501 aStateMachine
.AddToken("struct", nTok_mt_struct
, A_nKeywordDefStatus
, finKeyw
);
502 aStateMachine
.AddToken("transient", nTok_ste_transient
, A_nKeywordDefStatus
, finKeyw
);
503 aStateMachine
.AddToken("typedef", nTok_mt_typedef
, A_nKeywordDefStatus
, finKeyw
);
504 aStateMachine
.AddToken("uik", nTok_mt_uik
, A_nKeywordDefStatus
, finKeyw
);
505 aStateMachine
.AddToken("unsigned", nTok_tmod_unsigned
, A_nKeywordDefStatus
, finKeyw
);
506 aStateMachine
.AddToken("virtual", nTok_ste_virtual
, A_nKeywordDefStatus
, finKeyw
);
507 aStateMachine
.AddToken("void", nTok_bty_void
, A_nKeywordDefStatus
, finKeyw
);
508 aStateMachine
.AddToken("...", nTok_bty_ellipse
, A_nPunctDefStatus
, finKeyw
);
510 aStateMachine
.AddToken("=", nTok_assignment
, A_nPunctDefStatus
, gotoAsg
);
512 aStateMachine
.AddToken("(", nTok_punct_BracketOpen
, A_nPunctDefStatus
, finPunct
);
513 aStateMachine
.AddToken(")", nTok_punct_BracketClose
,A_nPunctDefStatus
, finPunct
);
514 aStateMachine
.AddToken("[", nTok_punct_ArrayBracketOpen
,
515 A_nPunctDefStatus
, finIgn
);
516 aStateMachine
.AddToken("]", nTok_punct_ArrayBracketClose
,
517 A_nPunctDefStatus
, finIgn
);
518 aStateMachine
.AddToken("{", nTok_punct_CurledBracketOpen
,
519 A_nPunctDefStatus
, finPunct
);
520 aStateMachine
.AddToken("}", nTok_punct_CurledBracketClose
,
521 A_nPunctDefStatus
, finPunct
);
522 aStateMachine
.AddToken("<", nTok_punct_Lesser
, A_nPunctDefStatus
, finPunct
);
523 aStateMachine
.AddToken(">", nTok_punct_Greater
, A_nPunctDefStatus
, finPunct
);
524 aStateMachine
.AddToken(";", nTok_punct_Semicolon
, A_nPunctDefStatus
, finPunct
);
525 aStateMachine
.AddToken(":", nTok_punct_Colon
, A_nPunctDefStatus
, finPunct
);
526 aStateMachine
.AddToken("::", nTok_punct_DoubleColon
, A_nPunctDefStatus
, finPunct
);
527 aStateMachine
.AddToken(",", nTok_punct_Comma
, A_nPunctDefStatus
, finPunct
);
528 aStateMachine
.AddToken("-", nTok_punct_Minus
, A_nPunctDefStatus
, finPunct
);
529 aStateMachine
.AddToken(".", nTok_punct_Fullstop
, A_nPunctDefStatus
, finPunct
);
530 aStateMachine
.AddToken("/**", nTok_none_MLDocuBegin
, A_nPunctDefStatus
, gotoMld
);
531 aStateMachine
.AddToken("///", nTok_none_SLDocuBegin
, A_nPunctDefStatus
, gotoSld
);
532 aStateMachine
.AddToken("/*", nTok_none_MLCommentBegin
,
533 A_nPunctDefStatus
, gotoMlc
);
534 aStateMachine
.AddToken("//", nTok_none_SLCommentBegin
,
535 A_nPunctDefStatus
, gotoSlc
);
536 aStateMachine
.AddToken("/**/", nTok_ignore
, A_nPunctDefStatus
, finIgn
);
537 aStateMachine
.AddToken("#", nTok_none_PraeprocessorBegin
,
538 A_nPunctDefStatus
, gotoPrp
);
539 aStateMachine
.AddToken("\r\n", nTok_EOL
, A_nPunctDefStatus
, finEOL
);
540 aStateMachine
.AddToken("\r", nTok_EOL
, A_nPunctDefStatus
, finEOL
);
541 aStateMachine
.AddToken("\n", nTok_EOL
, A_nPunctDefStatus
, finEOL
);
542 aStateMachine
.AddToken("\n\r", nTok_EOL
, A_nPunctDefStatus
, finEOL
);