× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I always use lower case opcodes, mixed case operands, double dash
end-of-line comments.  Here is example from before and after MI pre-parser:

ab: cmpbla(b)  MessageData, "Hello World" / eq(Skip);  --comment
AB: CMPBLA(B)  MESSAGEDATA, "Hello World" / EQ(SKIP);  /*comment*/

Initialize CurrentState at 0, walk over each character and determine its
InputGroup (1-9), and calculate the new state (0-9):

CurrentState = Table( CurrentState, InputGroup );

When the CurrentState goes to 0, then you are on a lowercase letter not in
a string, so capitalize that letter (OR on bit x'40').  When the
CurrentState goes to 9, then you are on a double dash end-of-line comment,
so change double-dash into slash-asterisk and insert closing asterisk-slash
at end of source line.  Use this 10x9 state/transition table (ten states
(0-9), nine possible input groups (1-9)):

state 0:  1 2 1 3 1 6 7 8 0
state 1:  1 2 1 3 1 6 7 8 0
state 2:  2 2 2 2 1 2 2 2 2
state 3:  1 1 4 1 1 1 1 8 0
state 4:  4 4 5 4 4 4 4 4 4
state 5:  4 4 4 1 4 4 4 4 4
state 6:  6 6 6 6 6 1 6 6 6
state 7:  7 7 7 7 7 7 1 7 7
state 8:  1 2 1 3 1 6 7 9 0
state 9:  1 2 1 3 1 6 7 8 9

group 1:  everything else
group 2:  <
group 3:  *
group 4:  /
group 5:  >
group 6:  '
group 7:  "
group 8:  -
group 9:  abcdefghijklmnopqrstuvwxyz


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.