Mercurial > hg > index.cgi
comparison lwasm/pragma.c @ 399:6153cb49403c
Initial commit of pragma newsource
pragma newsource enables a source code variant as follows:
1. no line numbers
2. no implied comments at the end of lines
3. all comments must be introduced by a comment character
4. spaces are allowed in operands
(4) is not quite complete. This commit handles "operandless" instructions
(anything where the parser calls skip_operand()) and expression parsing.
author | William Astle <lost@l-w.ca> |
---|---|
date | Tue, 13 Oct 2015 23:38:02 -0600 |
parents | 4fd16faa4d93 |
children | c501b3ce39c8 |
comparison
equal
deleted
inserted
replaced
398:4cf907aa634c | 399:6153cb49403c |
---|---|
70 { "ct", "noct", PRAGMA_CT }, | 70 { "ct", "noct", PRAGMA_CT }, |
71 { "qrts", "noqrts", PRAGMA_QRTS }, | 71 { "qrts", "noqrts", PRAGMA_QRTS }, |
72 { "m80ext", "nom80ext", PRAGMA_M80EXT }, | 72 { "m80ext", "nom80ext", PRAGMA_M80EXT }, |
73 { "6809conv", "no6809conv", PRAGMA_6809CONV }, | 73 { "6809conv", "no6809conv", PRAGMA_6809CONV }, |
74 { "6309conv", "no6309conv", PRAGMA_6309CONV }, | 74 { "6309conv", "no6309conv", PRAGMA_6309CONV }, |
75 { "newsource", "nonewsource", PRAGMA_NEWSOURCE }, | |
76 { "nooldsource", "oldsource", PRAGMA_NEWSOURCE }, | |
75 { 0, 0, 0 } | 77 { 0, 0, 0 } |
76 }; | 78 }; |
77 | 79 |
78 int parse_pragma_helper(char *p) | 80 int parse_pragma_helper(char *p) |
79 { | 81 { |