Lines Matching refs:format

68 # (e.g. from a format 'let' block) into something whose indentation
109 # Template objects are format strings that allow substitution from
226 # A format object encapsulates an instruction format. It must provide
234 label = 'def format ' + id
265 # Special null format to catch an implicit-format instruction
266 # definition outside of any format block.
273 'instruction definition "%s" with no active format!' % name)
1564 # This dictionary maps format name strings to Format objects.
1577 # The format stack.
2002 # format operation will reduce them back to single '%'s.
2133 # An instruction format definition looks like
2134 # "def format <fmt>(<params>) {{...}};"
2140 # The formal parameter list for an instruction format is a
2202 # End of format definition-related rules.
2267 # 1. Format blocks 'format <foo> { ... }'
2284 # A format block 'format <foo> { ... }' sets the default
2285 # instruction format used to handle instruction definitions inside
2286 # the block. This format can be overridden by using an explicit
2287 # format on the instruction definition or with a nested format
2291 # The format will be pushed on the stack when 'push_format_id'
2294 # with the format, so now we can pop it.
2298 # This rule exists so we can set the current format (& push the
2299 # stack) when we recognize the format name part of the format
2305 t[0] = ('', '// format %s' % t[1])
2307 error(t.lineno(1), 'instruction format "%s" not defined.' % t[1])
2366 # Define an instruction using the current instruction format
2367 # (specified by an enclosing format block).
2371 # Pass the ID and arg list to the current format class to deal with.
2381 # Define an instruction using an explicitly specified format:
2386 format = self.formatMap[t[1]]
2388 error(t.lineno(1), 'instruction format "%s" not defined.' % t[1])
2390 codeObj = format.defineInst(self, t[3], t[5], t.lexer.lineno)
2438 # block) and default values for formal parameters of format
2496 '''Define a new format'''
2500 error(lineno, 'format %s redefined.' % id)
2506 '''Protect any non-dict-substitution '%'s in a format string