source: proto/RE/ref/re2pbs/compilable_template.py @ 2555

Last change on this file since 2555 was 2317, checked in by ksherdy, 7 years ago

Added reference implementation.

File size: 708 bytes
Line 
1# -*- coding: utf-8 -*-
2#
3# compilable.py template
4#
5# Ken Herdy
6# April 20, 2010
7#
8#----------------------------------------------------------------------------
9#
10# (at)lex_strms - Lexical Item Streams.
11# (at)cc_code   - Character Class compiler equations.
12# (at)pbs_code  - Parallel bit stream equations.
13#
14#----------------------------------------------------------------------------
15
16class Basis_bits():
17        bit_0 = 0
18        bit_1 = 0
19        bit_2 = 0
20        bit_3 = 0 
21        bit_4 = 0
22        bit_5 = 0
23        bit_6 = 0
24        bit_7 = 0 
25 
26class Lex():
27@lex_strms 
28
29def Classify_bytes(basis_bits,lex):
30@cc_code
31        return lex
32
33def Demo(u8data, lex):
34@pbs_code
35        return
36
37def Main(basis_bits, lex):     
38        Classify_bytes(basis_bits, lex)
39        Demo(lex, scope1)
Note: See TracBrowser for help on using the repository browser.