Skip to content

Instantly share code, notes, and snippets.

View azmfaridee's full-sized avatar
🎯
Focusing

Abu-Zaher Faridee azmfaridee

🎯
Focusing
View GitHub Profile
<dictionary>
<pardefs>
<!-- রওয়া; রওয়া -->
<pardef n="রওয়া__n_mf">
<e>
<p>
<l></l>
<r><s n="n"/><s n="mf"/><s n="nn"/><s n="sg"/><s n="nom"/></r>
</p>
</e>
#ifndef _Ltstr_
#define _Ltstr_
#include <string>
#include <cwchar>
#include <cstring>
using namespace std;
struct Ltstr
#include <iostream>
#include <string>
#include <fstream>
typedef std::basic_filebuf<wchar_t, std::char_traits<wchar_t> > wfilebuf_t;
#define BUFFER_SIZE 512
using namespace std;
<def-macro n="f_bcond" npar="2"><!--Per mirar si el blanc conté o no format -->
<choose>
<when>
<test>
<not>
<equal>
<b pos="1"/>
<lit v=" "/>
</equal>
</not>
import xml.parsers.expat
import codecs
from pprint import pprint
stack = []
codestack = []
def_cats = {}
def_attrs = {}
def_attrs_regex = {}
def_lists = {}
import xml.parsers.expat
import codecs
from pprint import pprint
import sys
DEBUG_MODE = False
# this stack holds information of the tree
stack = []
# genereated codes are held in the this stack and merged when necessary
<choose>
<when> # label -> when1_start
<test>
<in caseless="yes"/> # caseless mode on
<clip pos="1" side="sl" part="lem"/> # push 1, and push regex, clipsl
<list n="verbos_est"/>
</in>
</test> # jnz when1_when1_end
<let>
<clip pos="2" side="tl" part="lem"/> # check parent if let and if clip is its first child
import xml.parsers.expat
import codecs
from pprint import pprint
import sys
DEBUG_MODE = False
# this stack holds information of the tree
stack = []
# genereated codes are held in the this stack and merged when necessary
import xml.parsers.expat, sys, codecs
skip_tags = ['cat-item', 'def-cat', 'section-def-cats', 'attr-item', 'def-attr', 'section-def-attrs', 'def-var', 'list-item', 'def-list', 'section-def-vars', 'section-def-lists']
leaf_tags = ['clip', 'lit', 'lit-tag', 'with-param', 'var', 'b', 'list', 'pattern-item']
class ExpatParser(object):
def __init__(self, fileName, compiler):
self.fileName = fileName
import xml.parsers.expat, sys, codecs
skip_tags = ['cat-item', 'def-cat', 'section-def-cats', 'attr-item', 'def-attr', 'section-def-attrs', 'def-var', 'list-item', 'def-list', 'section-def-vars', 'section-def-lists']
leaf_tags = ['clip', 'lit', 'lit-tag', 'with-param', 'var', 'b', 'list', 'pattern-item']
class ExpatParser(object):
def __init__(self, fileName, compiler):
self.fileName = fileName